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.
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:
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!
@Anonymous , as of now conditional formatting is not supported on multiple legends , i doubt you can control that
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |