Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a chart and I want it to show the data only for 10 days before today'date. So if today is the 02/18/2019, I want it to show the data for:
02/18/2019 , 02/17/2019 , 02/16/2019 , 02/15/2019 , 02/14/2019 ... until ... 02/09/2019
Is there any calculated dimension I could use?
Thanks
if the field is called Date then create a chart with Date as dimension
then in the expression your set analysis should contain something like this:
{<Date={">= today-10 <= today"}>}
usually I transform dates into numbers so in the script the field Date would be coming as num(DayStart(Date))) as Date
so expression would look like
sum({<Date={">= $(=num(addDays(Today(),-10)) <= $(=num(DayStart(Today()))"}>measure)
if the field is called Date then create a chart with Date as dimension
then in the expression your set analysis should contain something like this:
{<Date={">= today-10 <= today"}>}
usually I transform dates into numbers so in the script the field Date would be coming as num(DayStart(Date))) as Date
so expression would look like
sum({<Date={">= $(=num(addDays(Today(),-10)) <= $(=num(DayStart(Today()))"}>measure)