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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
v-binbinyu-msft
Community Support
Community Support

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.