Forum Discussion
Performance Dax measure
- 5 years ago
Hi, Anonymous
It’s my pleasure to answer for you.
According to your description,Can you wait until this measure is loaded and the result is displayed, is it the correct result?
Try like this:
Amount = VAR AmountV2 = CALCULATE ( SUM ( Transaction[AccountingAmountDebit] ) - SUM ( Transaction[AccountingAmountCredit] ), FILTER ( ALLSELECTED ( Transaction ), Transaction[AccountingDate] >= MIN ( Transaction[AccountingDate] ) && Transaction[Concat_ID] <= MAX ( Transaction[Concat_ID] ) ) ) RETURN IF ( AmountV2 = BLANK (), [OpeningBalance], AmountV2 + [OpeningBalance] )You can also split your measure into several, then use the performance analyzer to see which one takes the longer time, and then improve it.
If it doesn’t solve your problem, please feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Anonymous
It’s my pleasure to answer for you.
According to your description,Can you wait until this measure is loaded and the result is displayed, is it the correct result?
Try like this:
Amount =
VAR AmountV2 =
CALCULATE (
SUM ( Transaction[AccountingAmountDebit] )
- SUM ( Transaction[AccountingAmountCredit] ),
FILTER (
ALLSELECTED ( Transaction ),
Transaction[AccountingDate] >= MIN ( Transaction[AccountingDate] )
&& Transaction[Concat_ID] <= MAX ( Transaction[Concat_ID] )
)
)
RETURN
IF ( AmountV2 = BLANK (), [OpeningBalance], AmountV2 + [OpeningBalance] )
You can also split your measure into several, then use the performance analyzer to see which one takes the longer time, and then improve it.
If it doesn’t solve your problem, please feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.