Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Performance Dax measure

Hello Community,    I'm working on a report and I have difficulties to show some Amounts. The problem is due to a measure that I have developed and it is causing the problem. below is the formula t...
  • v-janeyg-msft's avatar
    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.