Reputation: 145
Does Power BI have a chart that can highlight to compare three periods? In this case, they are current month, previous month, and the same period last year.
I have the three measures ready but couldn't find a chart type to highlight the periods I want to compare and grey out the rest.
Upvotes: 2
Views: 1305
Reputation: 40224
I believe the key here is using a measure on the chart's color saturation field.
I was able to achieve the following where the bar colors are dependent on the date slicer:
I defined my measure like this:
Color =
VAR SelectedDate = SELECTEDVALUE(Cal[Month])
RETURN 0.5*(EOMONTH(SelectedDate, -12) IN VALUES(MTS[Date])) +
0.8*(EOMONTH(SelectedDate, -3 ) IN VALUES(MTS[Date])) +
1*(EOMONTH(SelectedDate, 0 ) IN VALUES(MTS[Date]))
where MTS
is a monthly time series table and Cal
is an unrelated calendar table that only has month ends. Only one of the conditions holds at a time and the constants in front just define where on the color range the result will land when the condition returns TRUE()
(which gets coerced to be 1
when multiplying).
Once you've put a measure on the color saturation field, you can access the data color settings under the Format section:
Upvotes: 1
Reputation: 132
If you are just looking to highlight three measures manually to distinguish from the others you can go into the Format tab, and under "Data colors" you can toggle on the "Show all" option and change them there.
You could also use a slicer.
Upvotes: 0