Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

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 that I'm using : 

 
Amount = 
VAR Main_Account_V2=ALLEXCEPT(Transaction,Transaction[MainAccount],MainAccount[Libellé de compte],'Transaction DataArea'[Entité Juridique])
VAR Min_Date_V2=CALCULATE(MIN(Transaction[AccountingDate]),ALLSELECTED(Transaction))
VAR AmountV2=CALCULATE(SUM(Transaction[AccountingAmountDebit])-SUM(Transaction[AccountingAmountCredit]),Main_Account_V2,FILTER(ALL(Transaction[AccountingDate]),Transaction[AccountingDate]>=Min_Date_V2),FILTER(ALL(Transaction[Concat_ID]),Transaction[Concat_ID]<=MAX(Transaction[Concat_ID])))
Return
IF(AmountV2=BLANK(),[OpeningBalance],AmountV2+[OpeningBalance])
and it's doing this problem on my report. So I cant see the data on the table chart !!! (I circled it in yellow)
 

Capture.PNGAnd when I deselect the display measure I can see what I am displaying. bellow the capture...

 

Capture2.PNG

 Any ideas to solve this problem? Any solution to suggest?

 

Regards,

Thanks a lot.

1 ACCEPTED SOLUTION
v-janeyg-msft
Community Support
Community Support

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.

3.png

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.

View solution in original post

1 REPLY 1
v-janeyg-msft
Community Support
Community Support

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.

3.png

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.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

Top Solution Authors