Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

RLS Changing the Count Measure Value

Hello,

 

I have a report which brings data from tables merged together as 1 using INNER JOIN.

 

The main table is - SiteMembership

 

dd_55_1-1637682726137.png

 

 I need to Count the SiteMapId from SiteMembership where Group Id = 2

Query: SELECT COUNT (*) FROM dbo.SiteMembership WHERE  GroupID = 2

 

DAX Written: 

Client Count =
VAR V1 = CALCULATE(COUNT(SiteMembership[SiteMapID]),SiteMembership[GroupID]=2)
RETURN IF( V1 = 0, 0, v1)
 
This works fine without RLS which is on the SiteMembership table on UserPrincipalName and SiteMgr = TRUE()
 
But when security is applied the Counts become 0 and for the site The counts become 0
 
dd_55_2-1637682996728.png

 Without RLS the counts for the site are correct.

dd_55_3-1637683061395.png

 

@PBICommunity - Can someone help

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@amitchandak Thanks, I resolved it myself. The issue was that the bridge table for dynamic RLS was not created and hence it was directly applying the filters on the main table.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@amitchandak Thanks, I resolved it myself. The issue was that the bridge table for dynamic RLS was not created and hence it was directly applying the filters on the main table.

amitchandak
Super User
Super User

@Anonymous ,what should happen with RLS.

 

I think you should use a measure like

 


Client Count =
VAR V1 = CALCULATE(COUNT(SiteMembership[SiteMapID]),filter(SiteMembership, SiteMembership[GroupID]=2) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors