cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper II

## Conditional format a bar chart over 75th Quartile

Hi All,

I have a bar chart in which I want to colour the bars of the chart for all the values over the 75th quartile.

the quartile I am calculating as VAR _A =
SUMMARIZE (
'MainFacts',
'MainFacts'[ProvCode],
'MainFacts'[p_spell_id],
"MaxRwCnt", MAX ( MainFacts[RwCnt] )
)
RETURN
PERCENTILEX.INC ( _A, [MaxRwCnt], .75 )

1 ACCEPTED SOLUTION
Community Support

Hi @SteveIOW ,

According to your description, I create a sample.

And create a measure as you mentioned.

Now for example in the bar chart RwCnt by p_spell_id, if we want to color the bar based on whether the RwCnt greater than the Quartile 7.25. Here's my solution.

1. Create a measure.

``````Color =
IF (
MAX ( 'MainFacts'[RwCnt] ) >= CALCULATE ( [Quartile], ALL ( 'MainFacts' ) ),
"Red",
"Green"
)
``````

Then in the visual format setting pane, select Bars>Colors>fx.

Select the measure in the field dialoge.

Get the correct result.

I attach my sample below for your reference.

Best Regards,
Community Support Team _ kalyj

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

2 REPLIES 2
Community Support

Hi @SteveIOW ,

According to your description, I create a sample.

And create a measure as you mentioned.

Now for example in the bar chart RwCnt by p_spell_id, if we want to color the bar based on whether the RwCnt greater than the Quartile 7.25. Here's my solution.

1. Create a measure.

``````Color =
IF (
MAX ( 'MainFacts'[RwCnt] ) >= CALCULATE ( [Quartile], ALL ( 'MainFacts' ) ),
"Red",
"Green"
)
``````

Then in the visual format setting pane, select Bars>Colors>fx.

Select the measure in the field dialoge.

Get the correct result.

I attach my sample below for your reference.

Best Regards,
Community Support Team _ kalyj

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

Helper II

that is brilliant - thank you so much for your help!

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - June 2024

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

#### Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors
Top Kudoed Authors