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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
learner03
Post Partisan
Post Partisan

pie chart based on count

I have these two columns in the report- I want Pie chart based on count of the rows of months column where months value is between 1-2 then3 and 6,6-10 and rest more than 10. And showing sum of dollar value in the pie chart in their respective region.

Cost Months
$481,948 8
$399,263 25
$295,784 36
$229,014 25
$191,070 8
$188,109 8
$147,928 4
$136,728 2
$106,519 5
$102,782 10
$77,583 5
$92,820 7
$82,212 6
$76,248 9
$68,529 3
$71,543 34
$53,061 4
$49,058 6
$25,054 42
$19,115 12
$20,128 2
$21,550 20
5 REPLIES 5
v-jingzhang
Community Support
Community Support

Hi @learner03 

 

You can add a calculated column with below DAX in the original table, then use it to create a pie chart like below. Is this what you want? "Sum of Cost" will display in the pop-up tooltip once the mouse cursor hovers over a sector. 

Month Group = 
SWITCH(TRUE(),
    'Table'[Months]<=2, "1-2",
    'Table'[Months]<=6, "3-6",
    'Table'[Months]<=10, "7-10",
    "> 10"
)

vjingzhang_0-1675649901305.png

vjingzhang_1-1675650071551.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Hi @v-jingzhang  Can I do this in some way using a measure because my stock cover and Cost is a measure and not a direct column in the table?

Hi @learner03 

I'm not sure without knowing how the data is like. Can you provide some sample data in table format and the DAX formula of those measures? And which fields do you want to place into the pie chart?

BR,

Jing

amitchandak
Super User
Super User

@learner03 , are you looking for count bucketing?

 

Dynamic Segmentation Bucketing Binning
https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1...


Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak I followed your video but mine is below output-

akapoor03_0-1675400205758.png

Where am I doing wrong?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors