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.
Hi,
I have a table with Brand Names in rows and Dates in columns. There are around 30 brands, and new ones can be added along the way. In the table if the brand exists in a certain date, it is marked as Y. I want to colour the font a colour based on the brand name and Ys. The matrix visual should look something like this (this is a summary table, actually there are a lot more brands and dates):
1/1/2021 | 1/2/2021 | 1/3/2021 | 1/4/2021 | 1/5/2021 | |
Brand A | Y | Y | Y | ||
Brand B | Y | Y | Y | Y | |
Brand C | Y | Y | |||
Brand D | Y | Y | Y |
How do I do this conditional formatting? I have a table like this which identifies the hex code for each brand, but idk how to use it:
Brand | ColourHex |
A | #00CCFF |
B | #CCFFFF |
C | #CCFFCC |
D | #FFFF99 |
E | #99CCFF |
F | #FF99CC |
G | #CC99FF |
H | #FFCC99 |
9 | #3366FF |
10 | #33CCCC |
11 | #99CC00 |
12 | #FFCC00 |
13 | #FF9900 |
14 | #FF6600 |
Solved! Go to Solution.
Hi @ET1995 ,
I created a sample pbix file for you(see attachment), please check whether that is what you want.
1. Create a measure to get the related color under different brand
Conditional formatting =
CALCULATE (
MAX ( 'Fontcolor format'[ColourHex] ),
FILTER (
'Fontcolor format',
'Fontcolor format'[Brand] = SELECTEDVALUE ( 'Table'[Brand] )
)
)
2. Create a matrix and set conditional formatting for Values field as the below screenshot
Best Regards
Hi @ET1995 ,
I created a sample pbix file for you(see attachment), please check whether that is what you want.
1. Create a measure to get the related color under different brand
Conditional formatting =
CALCULATE (
MAX ( 'Fontcolor format'[ColourHex] ),
FILTER (
'Fontcolor format',
'Fontcolor format'[Brand] = SELECTEDVALUE ( 'Table'[Brand] )
)
)
2. Create a matrix and set conditional formatting for Values field as the below screenshot
Best Regards
@ET1995 , make sure this table it joined with brand you are using or part of the brand table
create a measure max(brandcolor[ColourHex]) and use that is conditional formatting using field value option
or measure like
maxx(filter(brandcolor, brandcolor[ColourHex] =max(Table[Brand])),brandcolor[ColourHex])
How to do conditional formatting by measure and apply it on pie?: https://youtu.be/RqBb5eBf_I4
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |