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
vksk0338
New Member

DAX Query to subtract current col from previous column

I have a calculated field in tableau :ROUND(SUM([ECL_Prov_Final (in Cr)]) - LOOKUP(ZN(SUM([ECL_Prov_Final (in Cr)])), -1),2)
Please help me to write a DAX query in PowerBI.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @vksk0338,

In power bi data model tables, current it does not include row and column index. Any fields that stored regular values to be use as the index for these calculations? Can you please share some more detail?

How to Get Your Question Answered Quickly  

BTW, you an also try to use the following measure formula if helps:

formula =
VAR _index =
    MAX ( Table1[Index] )
RETURN
    ROUND (
        SUM ( Table1[ECL_Prov_Final (in Cr)] )
            - LOOKUPVALUE ( Table1[ECL_Prov_Final (in Cr)], Table1[Index], _index - 1 ),
        2
    )

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

HI @vksk0338,

In power bi data model tables, current it does not include row and column index. Any fields that stored regular values to be use as the index for these calculations? Can you please share some more detail?

How to Get Your Question Answered Quickly  

BTW, you an also try to use the following measure formula if helps:

formula =
VAR _index =
    MAX ( Table1[Index] )
RETURN
    ROUND (
        SUM ( Table1[ECL_Prov_Final (in Cr)] )
            - LOOKUPVALUE ( Table1[ECL_Prov_Final (in Cr)], Table1[Index], _index - 1 ),
        2
    )

Regards,

Xiaoxin Sheng

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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