cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Conditional formatting based on multiple fields

Hi,

 

I have different countries in my data and I would like to have different conditional formatting between countries for the same measure/metric. My fact tables are connected to a Team table which has a column Country filled for each team. That means each of the fact table rows can be connected to country information.

 

How should I modify the aforementioned "Condition measure" to take this into consideration? I would like to have Diverging red-yellow-green conditional formatting with these boundaries for example:

 

If team[country] = Norway then boundary for red is 1, for yellow 2, for green 3

if team[country] = Germany then boundary for red is 10, for yellow 20, for green 30 

etc.

3 REPLIES 3
Community Support Team
Community Support Team

Re: Conditional formatting based on multiple fields

HI @FatherTheWizard ,

 

You can consider to write a measure to check conditions and return color code, then enable conditional formatting features based on measure value.

 

Regards,

Xiaoxin Sheng

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



For learning resources/Release notes, please visit: | |

Re: Conditional formatting based on multiple fields

Hi @v-shex-msft 

 

Thanks. Would it be possible to show an example DAX in practise?

 

If I have for example very basic CALCULATE(SUM('(fact) invoicing'[amount])) as a measure and for each row in Invoicing table I have team_id identifier which is connected to a Team table where we have the country information. For conditional formatting we would have [amount] and [Country] as the two fields to define traffic light.

Community Support Team
Community Support Team

Re: Conditional formatting based on multiple fields

Hi @FatherTheWizard ,

 

Can you please share some sample data with expected result for test?

 

Regards,

Xiaoxin Sheng

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



For learning resources/Release notes, please visit: | |

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 150 members 2,006 guests
Please welcome our newest community members: