Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Team,
We have prediction data.
I want to show in line chart
1. if month of January 2023 to current month(July 2023) data appear in one color
2. And remaining data for.e.g. Next month is august 2023 to Dec 2023 data should come in another color?
kindly suggest.
Thanks.
Hi, in line chart properties menu, under 'Appearance'->'Colors and legend' choose color 'by expression' and describe condition for your needs, f.e. below is used expression, where 'period' is a date:
if(MonthEnd(period)<=MonthEnd(today()), LightRed(), Green())
Hi, in line chart properties menu, under 'Appearance'->'Colors and legend' choose color 'by expression' and describe condition for your needs, f.e. below is used expression, where 'period' is a date:
if(MonthEnd(period)<=MonthEnd(today()), LightRed(), Green())
Hi @justISO,
This solution helpful, if we have only one measure in the chart. If we have second measure in the chart and don't want the two colours for the second measure, how do we skip/exclude the second one from the colour expression.
Please refer the below screenshot. The second line shouldn't be impacted.
Thanks and Regards
Mahesh Gadde
In this case, use Combo chart, not Line chart. Add you dimension and 2 measures. Under each measure here are 'More properties' button and in here you must set both measures as Line and in Primary axis. Additionally, you can set color for each line, not for whole chart: