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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

DAX performance issue

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.PNG

 

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

 

 

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

 

Regards,

Thanks a lot.

1 REPLY 1
AlB
Community Champion
Community Champion

Hi @Anonymous 

I'd need to see the model to be able to give a more accurate answer. Can you share the pbix (by PM if necessary)?

In the meantime, I don't think it will make a massive difference but try this:

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 maxConcat_ID_ =
    MAX ( Transaction[Concat_ID] )
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] <= maxConcat_ID_
        )
    )
RETURN
    [OpeningBalance]

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.