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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.