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!
I need some help with a Profit % calculated column. I think it is a very simple answer that I can't seem to see.
T_Profit = Table1[T_Revenue]-Table1[T_Cost]
T_Profit% = DIVIDE(Table1[T_Profit],Table1[T_Cost],0)
These two columns calculate fine on a row level, however, the Totals do not work, therefore when I try to put a Card visual for the overall T_Profit% is does not work. I don't know how to get the % of the total without it summing or averaging...
Example below
When I pull it into a card I am forced to find a calculation eg. It's either Sum (37.20%) or Average (9.30%) when it should be 12.40% still....
I think perhaps my DAX or my maths is incorrect. Can someone please provide me with a more effective DAX. Should I use a measure instead?
Thanks!
Solved! Go to Solution.
Yes, you should use measures instead. When you add a column to a visual like that Power BI will automatically create implicit measures anyway, better to do it yourself. You can also use the measures you define as building blocks for further measures, e.g.
Revenue = SUM(Table1[T_Revenue])
Cost = SUM(Table1[Cost])
Profit = [Revenue] - [Cost]
Profit % = DIVIDE( [Profit], [Cost], 0)
Yes, you should use measures instead. When you add a column to a visual like that Power BI will automatically create implicit measures anyway, better to do it yourself. You can also use the measures you define as building blocks for further measures, e.g.
Revenue = SUM(Table1[T_Revenue])
Cost = SUM(Table1[Cost])
Profit = [Revenue] - [Cost]
Profit % = DIVIDE( [Profit], [Cost], 0)
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 |
---|---|
45 | |
26 | |
22 | |
13 | |
7 |
User | Count |
---|---|
73 | |
51 | |
45 | |
16 | |
12 |