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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
minerallife
Regular Visitor

How to create chart from count itself and show as percentage

minerallife_0-1704283446767.png
how to create this chart by count "Custom Column" and show it as 2 line (Count itself and show as percentage)
i have date dimention too it's name as "Month&Year"
minerallife_1-1704283763202.png

 

1 ACCEPTED SOLUTION
v-weiyan1-msft
Community Support
Community Support

Hi @minerallife ,

 

Based on your description,
you might consider using the following code to create two Measures.
My Sample:

vweiyan1msft_0-1705806658909.png

Sub portion = 
VAR Total = COUNT('Table'[Custom Column])
RETURN 
DIVIDE(COUNTX(FILTER('Table','Table'[Custom Column] = "SUB"),[Custom Column]), Total)
OD portion = 
VAR Total = COUNT('Table'[Custom Column])
RETURN 
DIVIDE(COUNTX(FILTER('Table','Table'[Custom Column] = "OD"),[Custom Column]), Total)

Result is as below.

vweiyan1msft_1-1705806713273.png

Is this the result you expect?
For further details, please find attachment.
If I've misunderstood you, please provide detailed sample data and the results you are hoping for. We can better understand the problem and help you. Show it as a screenshot or excel. Please remove any sensitive data in advance.

 

Best Regards,
Yulia Yan

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
v-weiyan1-msft
Community Support
Community Support

Hi @minerallife ,

 

Based on your description,
you might consider using the following code to create two Measures.
My Sample:

vweiyan1msft_0-1705806658909.png

Sub portion = 
VAR Total = COUNT('Table'[Custom Column])
RETURN 
DIVIDE(COUNTX(FILTER('Table','Table'[Custom Column] = "SUB"),[Custom Column]), Total)
OD portion = 
VAR Total = COUNT('Table'[Custom Column])
RETURN 
DIVIDE(COUNTX(FILTER('Table','Table'[Custom Column] = "OD"),[Custom Column]), Total)

Result is as below.

vweiyan1msft_1-1705806713273.png

Is this the result you expect?
For further details, please find attachment.
If I've misunderstood you, please provide detailed sample data and the results you are hoping for. We can better understand the problem and help you. Show it as a screenshot or excel. Please remove any sensitive data in advance.

 

Best Regards,
Yulia Yan

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

amitchandak
Super User
Super User

@minerallife , Percent of total ?

 

Two measures

M1 = count(Table[Custom])

 

M1 % = divide(count(Table[Custom]) , calculate(count(Table[Custom]) , allselected()) )

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors