CUSTOMDATA Function (DAX)

How does the CUSTOMDATA function (DAX) work?

The CUSTOMDATA function (DAX) returns the content of the CustomData property in the connection string ().

CUSTOMDATA Formula Syntax

CUSTOMDATA (
     
)

How do you use the CUSTOMDATA function?

This function is commonly used implementing expressions for role based security when an application uses custom authentication.

Related Blog Posts

Related Support Forum Posts

Working With Iterating Functions In DAX
DAX Calculations: Total Of Average Results
Updated Mastering DAX Calculations Course Now Officially Launched

Considerations when using the CUSTOMDATA function

If the custom data flag is not passed in, this will return False; otherwise, it will return True only if the region for the current row equals the one passed in via the connection string.

If you use the Role when viewing a pivot table based upon your model, you’ll see nothing.

One way to edit the connection string used is to choose this ribbon option.

Related Video Tutorials

Formula examples using the CUSTOMDATA function

=IF(CUSTOMDATA()=”OK”, “Correct Custom data in connection string”, “No custom data in connection string property or unexpected value”)

IF ( CUSTOMDATA () = “”, FALSE (), Region[RegionName] = CUSTOMDATA () )

strtoset(“{([People Matter Fee Earner].[BU Login].[BU Login].[“+CustomData()+”])}”)

Related Course Modules

Ultimate-Beginners-Guide-To-PowerBI

DOWNLOAD

To access our comprehensive DAX formula reference guide just insert your email address below. The resource will download immediately and we’ll also email it to you.