cancel
Showing results for
Did you mean:
Helper I

## Conditional Formatting based on Average Value of Measure

Hi,

I hope you can help me out with this..

I created a bar chart with for each month the percentage assigend value versus turnover.

But I would like to color the bars if the % is higher than the average %. The bars are now colored if the % > 3%.

The bars are based on the following measure:

Assigned Value versus Turnover = DIVIDE([Total Assigned Value];SUM('Claims&Billing'[Turnover Actuals]))
So basically a division of the measures.

Do you know how to do this?

Thx!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support

hi, @VSchepens

Is " 3% " the overall average value?

If so, You could try this way:

Add a new average Value measure by ALLSELECTED/ ALL like

NOTE: using  ALL  depends on whether you will filter date on visual.

```NEW Assigned Value versus Turnover 1 =
DIVIDE (
[Total Assigned Value],
CALCULATE (
SUM ( 'Claims&Billing'[Turnover Actuals] ),
ALLSELECTED ( 'Date'[Date] )
)
)```

OR

```NEW Assigned Value versus Turnover 1 =
DIVIDE (
[Total Assigned Value],
CALCULATE (
SUM ( 'Claims&Billing'[Turnover Actuals] ),
ALL ( 'Date'[Date] )
)
)```

Step2:

Create a conditional measure like

`conditional = IF([Assigned Value versus Turnover]>[NEW Assigned Value versus Turnover 1],1,2)`

Step3:

Select bar chart, then click Format->Date colors->Advanced controls

Result:

In my case, the average is 4.5

Best Regards,

Lin

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

hi, @VSchepens

Is " 3% " the overall average value?

If so, You could try this way:

Add a new average Value measure by ALLSELECTED/ ALL like

NOTE: using  ALL  depends on whether you will filter date on visual.

```NEW Assigned Value versus Turnover 1 =
DIVIDE (
[Total Assigned Value],
CALCULATE (
SUM ( 'Claims&Billing'[Turnover Actuals] ),
ALLSELECTED ( 'Date'[Date] )
)
)```

OR

```NEW Assigned Value versus Turnover 1 =
DIVIDE (
[Total Assigned Value],
CALCULATE (
SUM ( 'Claims&Billing'[Turnover Actuals] ),
ALL ( 'Date'[Date] )
)
)```

Step2:

Create a conditional measure like

`conditional = IF([Assigned Value versus Turnover]>[NEW Assigned Value versus Turnover 1],1,2)`

Step3:

Select bar chart, then click Format->Date colors->Advanced controls

Result:

In my case, the average is 4.5

Best Regards,

Lin

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

@v-lili6-msft

Thanks for the reply! it works!

Helper I

Hi!

The option "Select bar chart, then click Format->Date colors->Advanced controls" is missing in mine. Do you have any idea why?

Thanks,

Soraia

Community Support

hi, @SoraiaT

In November 2018, this is moved to  Date colors from field.

With this upgrade, you’ll notice the color saturation bucket is no longer in the field well. Instead to format, you’ll go to the Data colors card in the formatting pane. Here you can format with the color pickers as normal or select the Advanced controls option to launch the conditional formatting dialog.

https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-november-2018-feature-summary/

Best Regards,

Lin

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

How would I achieve this if I just want to conditionally format the totals?

Announcements

#### Power Platform Community Conference

Check out the on demand sessions that are available now!

#### Power Platform October Community Highlights

Check out the top community contributors across all of the communities

#### Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors