Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello everyone,
In my matrix table, I compare the cost price (Cost) with the selling price (Revenue) per car, but also per part of the car. I want to have a measure for the difference between those two columns. It does happen that there are rows empty for the column Revenue. The sub total of the difference should remain empty too, since it doesn't make sense to compare Cost with Revenue with incomplete data.
I would like to have a measure which returns a Blank when this happen.
I added a sample set below. The column Difference should be the output of the measure.
Thank you in advance!
Cost | Revenue | Difference | |||
Car | Audi | $ 5.800,00 | $ 6.400,00 | $ 600,00 | |
Door | $ 500,00 | $ 550,00 | $ 50,00 | ||
Tyres | $ 800,00 | $ 850,00 | $ 50,00 | ||
Engine | $ 3.000,00 | $ 3.100,00 | $ 100,00 | ||
Window | $ 1.500,00 | $ 1.900,00 | $ 400,00 | ||
BMW | $ 5.550,00 | $ 6.300,00 | $ 750,00 | ||
Door | $ 450,00 | $ 550,00 | $ 100,00 | ||
Tyres | $ 700,00 | $ 850,00 | $ 150,00 | ||
Engine | $ 3.200,00 | $ 3.500,00 | $ 300,00 | ||
Window | $ 1.200,00 | $ 1.400,00 | $ 200,00 | ||
Mercedez | $ 7.100,00 | $ 1.800,00 | |||
Door | $ 600,00 | $ 800,00 | $ 200,00 | ||
Tyres | $ 800,00 | $ 1.000,00 | $ 200,00 | ||
Engine | $ 4.000,00 | ||||
Window | $ 1.700,00 | ||||
Ford | $ 4.500,00 | $ - | |||
Door | 300 | ||||
Tyres | 500 | ||||
Engine | $ 2.500,00 | ||||
Window | $ 1.200,00 |
Solved! Go to Solution.
Hi @Anonymous
You can try this measure
difference = IF(COUNTBLANK('Table'[Revenue]) > 0, BLANK(), SUM('Table'[Revenue])-SUM('Table'[Cost]))
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi @Anonymous
You can try this measure
difference = IF(COUNTBLANK('Table'[Revenue]) > 0, BLANK(), SUM('Table'[Revenue])-SUM('Table'[Cost]))
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
100 | |
88 | |
68 | |
61 |
User | Count |
---|---|
152 | |
120 | |
102 | |
87 | |
68 |