Forum Discussion
Aletom7
10 years agoRegular Visitor
Problem with Ratios
Hello, I'm pretty new here in the community, hope this is not a repeated post. I have a problem showing ratios in powerbi. I want the ratios be sorted by category and year in the same chart: ...
v-haibl-msft
10 years agoMicrosoft Employee
Thanks for your description, I seem to get the point. I think we need to do some transformation for the original dataset with following steps.
- In Query Editor, remove two columns of “Type” and “COSTS”.
- Unpivot all the columns except the first column of “YEAR”.
- Click ‘Group By’ and set as below.
- Create a measure with following formula.
Ratio = SUM ( 'ESTRAZIONE DATI'[NewValue] ) / CALCULATE ( SUM ( 'ESTRAZIONE DATI'[NewValue] ), 'ESTRAZIONE DATI'[Attribute] = "REVENUES" )
Best Regards,
Herbert
Aletom7
10 years agoRegular Visitor
The solution is good, but for me is not useful. Because I want to see these percentages not on the total of costs and revenues, but on the these totals belonging to particular CDC (center of costs, localities).
Is it possible to add this feature?
Thank you,
Alessandro