Forum Discussion
Total percentage value with a specific formula-Matrix visual
Hi All,
I have a client requirement to display the total percentage value with a specific formula, I am not sure if we can display the total of a matrix with a measure.
In the below screenshot Percentage (B/A) = 0.80% is the output by dividing column B with A i.e 2,933/368,294
But my requirement is to add Column B (859+489+50) for all non-zero values of Column A i.e.
1,398/368,294=0.38%
so my client requirement is to display the 0.38% instead of 0.80%.
Please find the sample data for reference.
Please share the steps to achieve this in Power BI desktop
Hi Anonymous ,
"Column A and Column B are measures."
Since I don’t know your measure formula, so I just give an example.
Please refer to my .pbix file.
Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 Replies
- FrankAT
Community Champion
Hi Anonymous
you can do it like this:
Percentage = VAR _SumB_OnlyByNonA_Blank = CALCULATE( SUM('Table'[B_]), FILTER( 'Table', 'Table'[A] <> BLANK() ) ) RETURN DIVIDE(_SumB_OnlyByNonA_Blank,[A])With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)- AnonymousNot applicable
Hi FrankAT ,
Column A and Column B are measures.
Could you share a tip to handle this requirement if we have measures?
- v-lionel-msft
Community Support
Hi Anonymous ,
"Column A and Column B are measures."
Since I don’t know your measure formula, so I just give an example.
Please refer to my .pbix file.
Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Ashish_Mathur
Super User
Hi,
The solution will depend upon whether A and B are measures or not. Share the link from where i can download your PBI file.