Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello kind soul,
I would like to make a button that show a range of date only when showing a line chart, but I face a problems where my chart does not display fully when I select a other two variable button for the 'date range' in the variable input.
My variable name is = $(vdate)
In the Variable Input. I set the button in order of :
1. 6 month = '6 Bulan'
2. 2 month = '2 Bulan'
3. 2 week= '2 Minggu'
In the line chart expression, I set the expression like this:
Pick($(vdate), Sum({<"=Dual(Year([date])&'-'&Month([date]),MonthStart([date]))"={'2021-Apr','2021-May','2021-Jun','2021-Jul','2021-Aug','2021-Sep'}>}[cases_malaysia(j).cases_new]),
Sum({<"=Dual(Year([date])&'-'&Month([date]),MonthStart([date]))"={'2021-Aug','2021-Sep'}>}[cases_malaysia(j).cases_new]),
Sum({<"=(WeekStart(Today())-WeekStart([date]))/7"={'1','2'}>}[cases_malaysia(j).cases_new]))
I hope someone can help me resolve this situation, so I can display the chart fully when selecting other button. Thank You.
Right. Could you try to uncheck "Include zero values"?
or play a bit with
Hope it helps.
m
Hi @Jack5 ,
I think that your chart works exactly how it should work. When you select 6 months, it shows 6 months, when you select 2 months, it shows 2 months, etc. Perhaps you want to highlight the period. In such case I would set the expression to Sum([cases_malaysia(j).cases_new]) and then set the color expression (appearance tab) i.e. pick(match('$(vdate)','6 Bulan','2 Bulan','2 Minggu'),blue(),red(),green()).
Hope it can help.
BR
m
Hi @mato32188 ,
Appreciate your prompt reply. Yes, the chart results works accordingly. Unfortunately for chart presentation, only '6 Bulan' chart display fully after the button is clicked. Fit nicely to the square.
Whereas, results for '2 Bulan' and '2 Minggu' are skewed. The date for the duration does not fit the square. My intention to have the date duration adjusted to the square too. I hope someone could help me to find ways to fix it. Thank you.
Right. Could you try to uncheck "Include zero values"?
or play a bit with
Hope it helps.
m
Thank you @mato32188 . It worked