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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
walt20221
Frequent Visitor

Substract 2 columns created through power bi matrix - comparing 2 weeks

Hello team, I am just starting with Power BI and I know this is not something new for you but I got some issues trying to acomplish this task.

 

I have a matrix visualization in power bi where I want to present open balance for customers comparing 2 weeks and at the end be able to see the substraction between the weeks per customer.

 

This is my visual:

 

walt20221_1-1684213588506.png

 

 

I did create a measure, however the measure is summing the values instead of applying substraction.

here is the measure that I am using:

 

Difference11 =
VAR thisweeknumber =
    MIN ('Calendar'[Week No])
VAR thisAmt =
    SUM (Sheet1[Amount Due Original])
var lastsweeknumber=CALCULATE(MAX('Calendar'[Week No]),FILTER(ALLSELECTED('Calendar'),'Calendar'[Week No]< MAX('Calendar'[Week No])))
VAR lastAmt =
    CALCULATE (
        SUM (Sheet1[Amount Due Original]),
        'Calendar'[Week No] = lastsweeknumber
    )
RETURN
thisAmt  - lastAmt

 

 

 

 

Please will be great if you can give me a light on this. Thank you so much.

1 REPLY 1
Anonymous
Not applicable

Hi @walt20221 ,

I'm a little confused about your needs, Could you please explain them further? It would be good to provide a screenshot of the results you are expecting and desensitized example data.

Thanks for your efforts & time in advance.

 

Best regards,
Community Support Team_Binbin Yu

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.