Forum Discussion
Problem calculating percentage total - bar chart
Hello guys!
I'm new in Power BI :) I'm trying to create a bar chart to display my data but it's working partially.
I create a new measure to calculate the percentage of total. Follow my formula:
Hi, try with this:
Medida = DIVIDE(SUM(Table1[Valor]),CALCULATE(SUM(Table1[Valor]),ALLSELECTED(Table1[Faixa])))
Regards
Victor
6 Replies
- v-yuta-msftCommunity Support
Seems like the slicers are both multi-selection slicers in your two screenshots, to be general, you may modify your measure like pattern below and try again:
Medida = DIVIDE ( COUNT ( Consulta1[Intervalo] ); CALCULATE ( COUNT ( Consulta1[Intervalo] ); ALLSELECTED ( Consulta1 ) ) )Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- rogeriosouzaxRegular Visitor
v-yuta-msft,
Thank you for feedback :)
I tried the pattern that you suggested. It works but not like I expected.I got the total percentage, if I sum all values referent A and B I have 99,99% and it's right. But I need that the sum of all B columns displays 100%(or almost it) and all A columns displays 100%(or almost it).
How could I do that? Is it possible? I tried the last pattern with ALLEXCEPT but using some filters the value displayed is incorrect.
Best regards,
Roger.
- v-yuta-msftCommunity Support
I got the total percentage, if I sum all values referent A and B I have 99,99% and it's right. But I need that the sum of all B columns displays 100%(or almost it) and all A columns displays 100%(or almost it).
How could I do that? Is it possible? I tried the last pattern with ALLEXCEPT but using some filters the value displayed is incorrect.
I tried the pattern that you suggested. It works but not like I expected.Could you clarify more about "display 100%"? If possible, could you please share some sample data?
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.