Forum Discussion
Anonymous
5 years agoNot applicable
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 mon...
v-kelly-msft
5 years agoCommunity 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,
Kelly
Did I answer your question? Mark my reply as a solution!