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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 52 | |
| 50 | |
| 34 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 94 | |
| 77 | |
| 41 | |
| 26 | |
| 25 |