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.
Hi,
Is anyone able to help me out with a simple calculation for a percentage out of total given selected filters.
How do you make your own measure calculation in a formula that provide the same result based on the multiple filters selection?
I don’t think the formula I have tried to make is useful at all. I have tried a formula like this (it does not work at all☹).
Quantity % = DIVIDE ( CALCULATE ( SUM ( Transactions[quantity] ); FILTER ( ALLSELECTED ( region_lookup[Sales_region]); CALCULATE ( SUM ( Transactions[quantity] )))))
I get the following error message: Too few arguments were passed to the Divide function. The minimum argument count for the function is 2 (see screen dump below)
I know there is the an easy "Quick Measure" in e.g. the Metrix visual, which can to show the percentage of column total (see the screen dump of the report below). Is it possible to change the predefined column header name “%CT” made by the quick measure function?
In addition to this matter, does anyone know how to get the percentage shown on a pie chart as labels either within the color area or on the side. The tooltip is able to show both the total numeric value and percentage (see the example below).
Solved! Go to Solution.
Hi @micalarsen,
Please modify the formula as below:
Quantity % = DIVIDE ( CALCULATE ( SUM ( Transactions[quantity] ); ALLSELECTED ( region_lookup[Sales_region] ) ); CALCULATE ( SUM ( Transactions[quantity] ) ) )
To get the percentage shown on a pie chart as labels, you can choose an item from the "Label Style" list.
Best regards,
Yuliana Gu
Hi @micalarsen,
Please modify the formula as below:
Quantity % = DIVIDE ( CALCULATE ( SUM ( Transactions[quantity] ); ALLSELECTED ( region_lookup[Sales_region] ) ); CALCULATE ( SUM ( Transactions[quantity] ) ) )
To get the percentage shown on a pie chart as labels, you can choose an item from the "Label Style" list.
Best regards,
Yuliana Gu
I usually do this:
Hi Greg
Thanks for your answer. I know that quick measure function. Do you know how to change the name of the new automated generated measure value?
Further on I am trying to make a measure formula that is able to do the same. Meaning that the measure will be calculating a percentage of the selected filter values.
You just double-click it and rename it.
For your own measure, try this: https://community.powerbi.com/t5/Quick-Measures-Gallery/Percent-of-Total/m-p/163661
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 |
---|---|
112 | |
97 | |
84 | |
67 | |
61 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |