Forum Discussion
Slow measure performance with Earlier function
Hi Team,
I have a DAX measure in my report as shown below:
3 Replies
- v-alq-msftCommunity Support
Hi, Deepesh_V95
Based on my research, It is the measure [SL$-MinMeasure] that causes this DAX measure to render very slowly. The measure will be calculated many times during the 'Filter' iterator. I'd like to suggest you use a variable to keep the measure out of the calculation. You may modify it as below.
Paid Sum_Stop Loss = var x = [SL$-MinMeasure] return CALCULATE( SUM('ops tClmsAllClmLines'[ClaimNetPay]), FILTER( 'ops tClmsAllClmLines', CALCULATE( SUM('ops tClmsAllClmLines'[ClaimNetPay]), FILTER( 'ops tClmsAllClmLines', 'ops tClmsAllClmLines'[MemberID] = EARLIER('ops tClmsAllClmLines'[MemberID]) ) ) >= x ) )Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Deepesh_V95Frequent Visitor
Thanks v-alq-msft . I tried this approach but still it is taking same amount of time to render. Is there anything else or any approach I can try out?
Thank you!
Deepesh
- AnonymousNot applicable
Did you already try to make a calculated table with a calculation on 'ops tClmsAllClmLines'[MemberID]? Then replace 'ops tClmsAllClmLines'[MemberID] with the related value of that table.