Forum Discussion
Clustered Column Chart - Data Colours Keep Changing on Data Refresh
Hi,
I have a Clustered Column Chart that is filtered to only show the last 3 months worth of data. Each month this report is updated automatically and a new months data is added (the previous month). When the report refreshes; a new month is added to the visual and the data colours keep changing and reflect the theme. I don't want this.
I want the first date (the earliest) to be red, the middle date to be grey and the last date (latest) to be black. I want this no matter which 3 months are selected. Is there any way to acheive this?
What it should look like:
What happens on refresh:
2 Replies
- amitchandakSuper User
Anonymous , as of now conditional formatting is not supported on multiple legends , i doubt you can control that
- v-kelly-msftCommunity Support
Hi Anonymous ,
Create a measure as below:
Measure = VAR _lastmonth = CALCULATE ( MONTH ( MAX ( 'Table'[Date] ) ), ALL ( 'Table' ) ) VAR _middilemonth = IF ( _lastmonth = 1, 12, _lastmonth - 1 ) VAR _firstmonth = IF ( _lastmonth = 2, 12, IF ( _lastmonth = 1, 11, _lastmonth - 2 ) ) RETURN IF ( MONTH ( MAX ( 'Table'[Date] ) ) = _lastmonth, 1, IF ( MONTH ( MAX ( 'Table'[Date] ) ) = _middilemonth, 2, IF ( MONTH ( MAX ( 'Table'[Date] ) ) = _firstmonth, 3 ) ) )Then go to field>data color>formatting:
Create a formatting rule as below:
And you will see:
My sample data is a bit simple,you could adjust the measure to suit your senario.
Check my .pbix file attached.
Best Regards,
KellyDid I answer your question? Mark my reply as a solution!