Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Assuming I have the below table with the rankings:
Country Customer_ID Total_Spend Rank
USA U_ABC $100 1
USA U_DEF $200 2
USA U_GHI $300 3
Germany G_JKL $100 4
Germany G_XYZ $100 5
I have the Row-level security implemented in my data model based on country. When the users who have access to only Germany the rank for the customers appears as G_JKL is 4 and G_XYZ = 5 whereas I want them to be 1 and 2 respectively. It seems that rank does not re-calculate on the basis of row-level security of filters? Instead it takes the entire data.
Can someone please help me out here? Basically I am looking the rank to be re-calculated on the basis of row-level security
Solved! Go to Solution.
Here is a measure version that utilizes that rank column to give you the result when filtered to by RLS to Germany:
Respectfully,
Zoe Douglas (DataZoe)
Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/
Here is a measure version that utilizes that rank column to give you the result when filtered to by RLS to Germany:
Respectfully,
Zoe Douglas (DataZoe)
Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/
@kabra_ashish , If you have created a column, it will not change. Create a measure with allselected.
For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/3...
@kabra_ashish - If Rank is a column, that is correct. Columns calculate at the time of data load and thus are not impacted by dynamic things like slicers or RLS. You need to implement your rank as a measure.
This may help: https://community.powerbi.com/t5/Quick-Measures-Gallery/To-Bleep-with-RANKX/m-p/1042520#M452
Question, can you use a measure to rank ignoring the RLS applied? To generate this rank table below, but when Germany access only sees rank 4 and 5.
Country Customer_ID Total_Spend Rank
USA U_ABC $100 1
USA U_DEF $200 2
USA U_GHI $300 3
Germany G_JKL $100 4
Germany G_XYZ $100 5
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 |
---|---|
81 | |
76 | |
61 | |
37 | |
33 |
User | Count |
---|---|
99 | |
56 | |
51 | |
42 | |
40 |