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
Anonymous
Not applicable

Conditional formatting with hierarchies

Hi,

 

I have a bar chart visual with the following heirachial levels

Level 1 - Country data

Level 2 - Province data

Level 3 - City data

The calculation is a percentage out of 100% with the Goal line at 85%.

 

Following are the scores

  1. City1, Province1: 84%, City2, Province1: 89%, City3, Province1: 87%
  2. City1, Province2: 86%, City2, Province2: 91%, City3, Province2: 88%

As per the above data City1, Province1 is failing, but if I plot the bar chart, the Level 1 (Country) and Level 2 (Province1) for Province 1 is displaying "Green" (conditional formatted). 

 

Question: Is it possible that Level 1 (Country) and Level 2 (Province1) is displayed "Red" if any data at the lower level heirarchy is failing.

Please advise.

2 ACCEPTED SOLUTIONS

Hi @Anonymous ,

 

I think you can use MINX to create a measure that gives you the lowest percentage from Level 3 (City).

This Measure you can use for your conditional formatting.

https://docs.microsoft.com/en-us/dax/minx-function-dax

 

Regards,

Marcus

Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


View solution in original post

v-jayw-msft
Community Support
Community Support

Hi @Anonymous 

 

You can create the measure below to get the min value of the country and add it to the Conditional Formatting Rules.

Measure = MINX('Table','Table'[value])

1.PNG

Result would be shown as below.

 5.PNG

2.PNG

3.PNG

4.PNG

 

Best Regards,

Jay

Community Support Team _ Jay Wang

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

 

 

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

View solution in original post

4 REPLIES 4
v-jayw-msft
Community Support
Community Support

Hi @Anonymous 

 

You can create the measure below to get the min value of the country and add it to the Conditional Formatting Rules.

Measure = MINX('Table','Table'[value])

1.PNG

Result would be shown as below.

 5.PNG

2.PNG

3.PNG

4.PNG

 

Best Regards,

Jay

Community Support Team _ Jay Wang

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

 

 

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
Anonymous
Not applicable

@v-jayw-msft  Thanks for the detailed reply and sharing the visuals. The MINX measure solution works.

Hi @Anonymous ,

 

I think you can use MINX to create a measure that gives you the lowest percentage from Level 3 (City).

This Measure you can use for your conditional formatting.

https://docs.microsoft.com/en-us/dax/minx-function-dax

 

Regards,

Marcus

Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Anonymous
Not applicable

@mwegener - Thanks for the reply. The MINX measure works

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.