Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi all,
I'm trying to create a measure that subtracts one measure from another and have it visualized in a matrix but with no success.
So far I have created a date table with this DAX code to spread evenly the output on the matrix:
I then created a measure that uses sumx that pulls from one table if a condition is met and another table if that condition is met:
I then created another date table with DAX code:
And then created a relationship based on date with another table and grabbed the column of interest which was successful
The problem I am now running into is that I want to subtract the output of the SUMX measure from the output of the visual directly above. As can be seen, the numbers are really off.
My initial inclination was to create an inactive relationship between the date tables then create a measure encapusltating the column in Calculate with the filtler being USERELATIONSHIP to force the inactive relationship between the two date tables and subtracting the measure with no luck.
I also referenced the two tables in Power Query applied the filters then appended the new tables into one Altering the SUMX measure with no luck
Has anyone encountered something similar?
Hi @BryceJones ,
Based on your description, you previously created inactive relationships in two date tables and wrapped the expressions using calculate. Then you can try to encapsulate the data in sumx so that it will be calculated in context at the same time
Subtraction Measure =
VAR _inputa = SUMX(FILTER('Table1', 'Table1'[Column1] < 123), 'Table1'[Column1])
VAR _inputb = SUMX(FILTER('Tabl2', 'Table2'[Column2] > 122), 'Table2'[Column2])
RETURN _inputa - _inputb
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi Albert,
Thank you. However, what I need is to subract is the SUMX measure I created from a column in a separate table.
Thanks,
Bryce
Hi @BryceJones
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
85 | |
79 | |
54 | |
39 | |
35 |
User | Count |
---|---|
102 | |
80 | |
49 | |
48 | |
48 |