cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Measures with CALCULATE statement not working when RLS is turned on

I have an issue with CALCULATE measures and RLS. I have created a measure to find cumulative total % of calls answered within bins of queue time. 

Expression: CumulativeCalls = IF(COUNTROWS(PowerBI_Cust_Comp) > 0; CALCULATE(COUNT(PowerBI_Cust_Comp[CorrelationID]);FILTER(ALL(PowerBI_Cust_Comp[RightQueueTime (bins)]); PowerBI_Cust_Comp[RightQueueTime (bins)] <= max(PowerBI_Cust_Comp[RightQueueTime (bins)])));BLANK()) 

 

CorrelationID is the ID of the call and RightQueueTime is the time customers are waiting before the call is answered. The measure behaves differently when I view the report as another user in a specified role compared to when I view the report with only a slicer creating the same filter. 

 

Measure behavior when RLS is turned ON: https://goo.gl/KCV8zj 

 

A cumulative measure should not decrease along the x axis. 

 

Anyone else with this issue?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Measures with CALCULATE statement not working when RLS is turned on

Hi @andrmi,

 

Please modify the measure like below then test again. 

 

CumulativeCalls = IF(COUNTROWS(PowerBI_Cust_Comp) > 0; CALCULATE(COUNT(PowerBI_Cust_Comp[CorrelationID]);FILTER(ALLSELECTED(PowerBI_Cust_Comp); PowerBI_Cust_Comp[RightQueueTime (bins)] <= max(PowerBI_Cust_Comp[RightQueueTime (bins)])));BLANK()) 

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Helper I
Helper I

Re: Measures with CALCULATE statement not working when RLS is turned on

@v-qiuyu-msft

 

Thank you! Now it works perfectly!

 

Much appreciated!

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Measures with CALCULATE statement not working when RLS is turned on

Hi @andrmi,

 

Please modify the measure like below then test again. 

 

CumulativeCalls = IF(COUNTROWS(PowerBI_Cust_Comp) > 0; CALCULATE(COUNT(PowerBI_Cust_Comp[CorrelationID]);FILTER(ALLSELECTED(PowerBI_Cust_Comp); PowerBI_Cust_Comp[RightQueueTime (bins)] <= max(PowerBI_Cust_Comp[RightQueueTime (bins)])));BLANK()) 

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Helper I
Helper I

Re: Measures with CALCULATE statement not working when RLS is turned on

@v-qiuyu-msft

 

Thank you! Now it works perfectly!

 

Much appreciated!

View solution in original post

Helpful resources

Announcements
Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors