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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Binway
Helper II
Helper II

calculate percentage values from counts

Hi,

I haved some very simple data that I want to group and count values against the total count expressed as a persnetage in a Card.

A sample data looks like this:

IdTraffic Light Indicator
1Green
2Green
3Red

 

After a bit of research on here I got the idea for some code that comes close.

Overall Traffic Light Percent = DIVIDE (

           COUNT('Table'[Id]),

           CALCULATE(COUNT('Table'[Id]),ALLSELECTED())  

)

Which produces this result in a table.

Overall Traffic LightOverall Traffic Light Percent
Green0.67
Red0.33

 

But I can't see how to turn this into a percentage value and display in a card so you see 67%, perhaps when the Card is visually filtered on Green or Red.

 

Thanks Binway

 

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

Hi @Binway,

 

You can format the measure rather than the visuals. The Card visual can only show up one value. So you need a Slicer to filter the colors.

 

calculate percentage values from counts .jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

Community Support Team _ Dale
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

1 REPLY 1
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Binway,

 

You can format the measure rather than the visuals. The Card visual can only show up one value. So you need a Slicer to filter the colors.

 

calculate percentage values from counts .jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

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

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