March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
125 | |
85 | |
69 | |
54 | |
45 |
User | Count |
---|---|
204 | |
106 | |
98 | |
65 | |
54 |