The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi,
I have the task, that is very simple in excel, but I cant figure out it in Powerbi desktop.
This is the data sample:
I need to calculate average profitability liek in the example.
Place | Income | Net profit | Net profitability |
A | 1000 | 10 | 1,00% |
B | 2000 | 20 | 1,00% |
C | 15000 | 4 | 0,03% |
Total | 18000 | 34 | 0,19% |
I need: (1+1+0,03)/3 = | 0,68% |
My measure DIVIDE (SUM(net profit), SUM(income)) gives me 0.19%, while I need to get 0.68%.
Please help me with this task.
Best wishes,
Kristina
Solved! Go to Solution.
Hi @KristinaSp ,
You can create a new measure
new Net profitability = var _total=SUMX('Table',[Net profitability])
return IF(ISINSCOPE('Table'[Place]),[Net profitability],DIVIDE(_total,COUNT('Table'[Place])))
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Write these measures:
Total income = SUM(Data[Income ])
Total profit = SUM(Data[Net profit ])
Net profitability (%) = DIVIDE([Total profit],[Total income])
Measure = if(hasonevalue(Data[Place]),[Net profitability (%)],AVERAGEX(VALUES(Data[Place]),[Net profitability (%)]))
Hope this helps.
Hi @KristinaSp ,
You can create a new measure
new Net profitability = var _total=SUMX('Table',[Net profitability])
return IF(ISINSCOPE('Table'[Place]),[Net profitability],DIVIDE(_total,COUNT('Table'[Place])))
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
82 | |
63 | |
54 | |
52 |
User | Count |
---|---|
128 | |
115 | |
80 | |
65 | |
63 |