Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
micalarsen
New Member

Calculate measure "Percent of Total" based on Dynamic Filters

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)

 

formula errorformula error

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?

Quick Measure - percentage of column.png

 

 

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).

 

Tooltip containing automatic percentage calculation.png

1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft Employee
Microsoft Employee

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.

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yulgu-msft
Microsoft Employee
Microsoft Employee

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.

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Community Champion
Community Champion

I usually do this:

 

image.png



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors