Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi guys,
I need some help with RLS and Calculate.
My data is setup as the following:
Each Location connected to a email address and each location within a Province
I have created a RLS for each Location using the email address and the USERPRINCIPALNAME() function. But when I view as the user I cannot get the total revenue for the region to be displayed. I then created a separate table for the revenue per region. Everything is working as it should. What I would like to do is insert a namecard with dynamic content to display ONLY the region total based on the user login.
What I currently have is the following:
Solved! Go to Solution.
Here are two solutions you can try. Each solution uses the following measure and RLS filter for DimLocation:
Province Net Sales = SUM ( 'Sum of Totals'[Net Sales] )
Solution 1
Create a many-to-many relationship between DimLocation and Sum of Totals. DimLocation should filter Sum of Totals.
Solution 2
There is no relationship between DimLocation and Sum of Totals. Add an RLS filter to Sum of Totals:
[Province] IN
CALCULATETABLE (
VALUES ( DimLocation[Province] ),
DimLocation[Email] = USERPRINCIPALNAME()
)
Proud to be a Super User!
@DataInsights thank you. Solution 2 worked. I had to use solution 2 as I created relationships between the locations and that mad a mess of everything
@ClaudeV, glad to hear that!
Proud to be a Super User!
Here are two solutions you can try. Each solution uses the following measure and RLS filter for DimLocation:
Province Net Sales = SUM ( 'Sum of Totals'[Net Sales] )
Solution 1
Create a many-to-many relationship between DimLocation and Sum of Totals. DimLocation should filter Sum of Totals.
Solution 2
There is no relationship between DimLocation and Sum of Totals. Add an RLS filter to Sum of Totals:
[Province] IN
CALCULATETABLE (
VALUES ( DimLocation[Province] ),
DimLocation[Email] = USERPRINCIPALNAME()
)
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
145 | |
87 | |
66 | |
51 | |
45 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |