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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Lopez0090
Helper III
Helper III

How to display individual values in a matrix visual

The number of "Colors" is counted for each "Time". There are two types of "Color", "Blue" and "Red", and the number of each color obtained is displayed.

It's easy enough to just count the number of colors, but I want to show the percentage of Blue out of the total number as well, as shown in the image below.

095955.jpg

 

This is a sample, but it uses this data.

100434.jpg

 

When I set the measure to value with the percentage calculated as a test, it is also displayed for Red and Totals.
How can I display only the percentage for Blue?

00410.jpg

 

I think this can be reproduced in a table visual by creating a measure with 4 (count columns by color + total column + percentage column for blue only) * 2 (number of types of Times) = 8.

However, this is not very realistic as we plan to increase the number of colors and the number of Times, such as 3rd.

 

If anyone knows of a better way to do this, could you please let me know?

 

 

Best regards, Lopez

1 ACCEPTED SOLUTION
Samarth_18
Community Champion
Community Champion

Hi @Lopez0090 ,

 

You can create a seperate measure for "# of Blue","# of Red","% of Blue"  like below and take direct sum of Count for total

# of Blue = CALCULATE(sum(Table[Count]),FILTER(Table,Table[Color] = "Blue"))
# of Red = CALCULATE(sum(Table[Count]),FILTER(Table,Table[Color] = "Red"))
% of Blue = divide(Table[# of Blue],SUM(Table[Count]),0)

 

Output:-

image.png

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

1 REPLY 1
Samarth_18
Community Champion
Community Champion

Hi @Lopez0090 ,

 

You can create a seperate measure for "# of Blue","# of Red","% of Blue"  like below and take direct sum of Count for total

# of Blue = CALCULATE(sum(Table[Count]),FILTER(Table,Table[Color] = "Blue"))
# of Red = CALCULATE(sum(Table[Count]),FILTER(Table,Table[Color] = "Red"))
% of Blue = divide(Table[# of Blue],SUM(Table[Count]),0)

 

Output:-

image.png

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.