Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I'm trying to integrate a PowerBi-report inside an Asp.net Core Web application. I generate the Embed-Token using the Microsoft.PowerBi.Api NUGET package.
I would like to filter what the user can see using a combination of username and customdata. Right now im able to sucessfully view a report with username and one value in customdata. But I would like to include several string values inside customdata eg.: "'id1','id2', 'id3'" and use the values in IN(CUSTOMDATA()). How can I do this? To generate the token I can only send in CUSTOMDATA as a string.. So how can I split CUSTOMDATA() into a list of values using DAX in the report?
Do DAX have any string.Split functionality or similar available?
Thx
Solved! Go to Solution.
Hi @Anonymous,
Customdata is an information function, and I'm not so sure if it allows advanced customize. You can try to use the following formula with path function to expand a text to list:
VAR _path =
SUBSTITUTE (
CONCATENATEX ( VALUES ( 'Table'[Column] ), [Column], "," ),
",",
"|"
)
VAR _length =
PATHLENGTH ( _path )
VAR _pathtable =
ADDCOLUMNS (
GENERATESERIES ( 1, _length, 1 ),
"Column", PATHITEM ( _path, [Value] )
)
In addition, I'd like to suggest you mapping these records in your tables and use RLS to filter them.
Regards,
Xiaoxin Sheng
Hi @Anonymous,
Customdata is an information function, and I'm not so sure if it allows advanced customize. You can try to use the following formula with path function to expand a text to list:
VAR _path =
SUBSTITUTE (
CONCATENATEX ( VALUES ( 'Table'[Column] ), [Column], "," ),
",",
"|"
)
VAR _length =
PATHLENGTH ( _path )
VAR _pathtable =
ADDCOLUMNS (
GENERATESERIES ( 1, _length, 1 ),
"Column", PATHITEM ( _path, [Value] )
)
In addition, I'd like to suggest you mapping these records in your tables and use RLS to filter them.
Regards,
Xiaoxin Sheng
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
8 | |
6 | |
5 | |
2 | |
2 |
User | Count |
---|---|
4 | |
4 | |
3 | |
3 | |
2 |