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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
PMEH
Frequent Visitor

Power bi

Hi I have a measure that calcluates the %

Add Pen% = DIVIDE(PA00109_HOMES_PASSED_DATAHEN_AGG[TotalWarmAddresses_Agg],PA00109_HOMES_PASSED_DATAHEN_AGG[TotalHP_Agg],0)

Here is the sample of data:
PMEH_0-1713497314089.png

Now I have to bucket these percentages as following and I should be able to use it as a filter.

"0%-10%", 
"11%-20%",
"21%-30%"
"31%-40%"
"41%-50%"
"51%+"
 
Any help or direction will be appreciated.
Thanks,
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @PMEH ,

First of all, many thanks to  for your very quick and effective replies.

Based on my testing, please try the following methods:

1.Create the simple table.

vjiewumsft_0-1713864404766.png

2.Create the new measure to calculate the percentage.

 

Add pen = 
VAR hp_ = SUMX('Table', 'Table'[Total hp])
VAR hpa = SUMX('Table', 'Table'[Total hp agg])
RETURN
DIVIDE(hp_, hpa)

 

3.Create the measure to filter the percentage.

 

Percentage = 
SWITCH(
        TRUE(),
        [Add pen] <= 0.1, "0%-10%",
        [Add pen] <= 0.2, "11%-20%",
        [Add pen] <= 0.3, "21%-30%",
        [Add pen] <= 0.4, "31%-40%",
        [Add pen] <= 0.5, "41%-50%",
        "51%+"
    )

 

4.Drag the measure into the table visual. The result is shown below.

vjiewumsft_1-1713864434465.png

 

Best Regards,

Wisdom Wu

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

2 REPLIES 2
Anonymous
Not applicable

Hi @PMEH ,

First of all, many thanks to  for your very quick and effective replies.

Based on my testing, please try the following methods:

1.Create the simple table.

vjiewumsft_0-1713864404766.png

2.Create the new measure to calculate the percentage.

 

Add pen = 
VAR hp_ = SUMX('Table', 'Table'[Total hp])
VAR hpa = SUMX('Table', 'Table'[Total hp agg])
RETURN
DIVIDE(hp_, hpa)

 

3.Create the measure to filter the percentage.

 

Percentage = 
SWITCH(
        TRUE(),
        [Add pen] <= 0.1, "0%-10%",
        [Add pen] <= 0.2, "11%-20%",
        [Add pen] <= 0.3, "21%-30%",
        [Add pen] <= 0.4, "31%-40%",
        [Add pen] <= 0.5, "41%-50%",
        "51%+"
    )

 

4.Drag the measure into the table visual. The result is shown below.

vjiewumsft_1-1713864434465.png

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Ashish_Mathur
Super User
Super User

Hi,

I have solved a similar problem in the attached file.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.