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
charrynsasi
Frequent Visitor

How to show a total regardless the user that is connected

Hello community,

 

Hope you're doing right.

 

I want to show the total of student even though i use RLS to filter data based on the user that is connected using USERPRINCIPALNAME DAX command.

 

Total student = CALCULATE(
DISTINCTCOUNT ( Student[ID] ),
ALL(Student),
Student[Level]=6)


The director of X school is able to see the total of these students but i want him to see as well the total of all student of all schools.

Is there away to do so ?

Regards,

1 ACCEPTED SOLUTION
5 REPLIES 5
bhanu_gautam
Super User
Super User

@charrynsasi To show the total number of students regardless of the user that is connected, you can modify your DAX formula to ignore the row-level security (RLS) filters.

 

Total student = CALCULATE(
DISTINCTCOUNT(Student[ID]),
ALL(Student)
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






@bhanu_gautam this is incorrect. You cannot use DAX to bypass RLS. ALL will remove filters, but it will not remove the restrictions placed by RLS. Any rows removed by RLS filters will not be visible at all, no matter what you do to the filter context.

@johnt75 , Right it will show total only when RLS is not placed




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






johnt75
Super User
Super User

Thank you @johnt75 

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.