Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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:
Id | Traffic Light Indicator |
1 | Green |
2 | Green |
3 | Red |
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 Light | Overall Traffic Light Percent |
Green | 0.67 |
Red | 0.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
Solved! Go to Solution.
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.
Best Regards!
Dale
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.
Best Regards!
Dale
User | Count |
---|---|
76 | |
75 | |
46 | |
31 | |
27 |
User | Count |
---|---|
99 | |
91 | |
51 | |
49 | |
46 |