Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hello -
I have a basic table below. The DAX formula for the measure is a simple COUNTROWS function:
Measure =COUNTROWS(Losses)
I have a couple of blanks in the table and need those to be replaced with zeroes, so I add +0 to the formula and it works as desired:
Measure = COUNTROWS(Losses)+0
However, when I apply a row level security role and view the visual as that role, the undesired blanks return, and the DAX formula has not been changed, it is still Measure = COUNTROWS(Losses)+0
This is very strange - I don't understand what's going on here. Thanks very much for your help!
@mstone3 What is your RLS role definition in terms of its DAX formula?
Hi @Greg_Deckler ,
The DAX formula for the role definition is [Level 2] = "NCTR"
Every row in the data has a 4 letter organizational acronym with column name "Level 2", so the role definition is just equal to the acronym.
Thank you
@mstone3 So would all of those rows for FY17 Involuntary Losses be filtered out for NCTR role? I'll have to do some mocking up of data unless you can provide a sample in text.
@Greg_Deckler Yes that's correct - all of those rows would be filtered out by the NCTR role. Based on your question, it sounds like there is a difference between the way RLS works and the way a regular slicer/filter would work without a RLS role applied, such that:
+With an RLS role enabled for 'NCTR', there are no rows/no data to access, so nothing to compute with the COUNTROWS function and therefore no +0 to add, so therefore blank results.
+If no RLS role, but instead filtered to 'NCTR' using a slicer/filter, there are still rows available for the formula to 'see' and for the COUNTROWS function to compute and then add +0, so therefore result shows zero. (all of the tables shown in the thread were filtered to 'NCTR' using a slicer)
Does that sound like the right way to think about it?
Thanks!
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
107 | |
68 | |
48 | |
44 | |
43 |