Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a line chart where i have:
Date as dimension
Expression as:
=sum({<Date_Clean={'$(vLast15Days)'}>} TotalPrice)
This gives me from today and 15 days back.
What if i want to make this dynamic, so if i select the 27 of august, it shows me 27 of august and 15days back.
Now its just static and i cannot select a date back in time.
I have these listboxed to choose:
Month, Year, Day
Yes, and today = num(date(today())
What´s the content of vLast15Days?
Its
='>=$(vPast15Days) <=$(vDateToday)
where
vDateToday = num(Date(Today(), 'YYYY-MM-DD'))
and vPast15Days = num(date(vDateToday-15, 'YYYY-MM-DD')
Create another variable and attach a calendar to it
Change your expressions
='>=$(vPast15Days) <=$(vDateToday)
where
vDateToday = num(Date(vNewVariable, 'YYYY-MM-DD'))
and vPast15Days = num(date(vNewVariable-15, 'YYYY-MM-DD')
Im not sure i follow you.
Attach a calendar to it?
I already have a mastercalendar.
Hi
Try like this
=sum({<Date_Clean={">=$(=Date(Max(Date_Clean)-15))<=$(=Max(Date_Clean))}>} TotalPrice)
Hope it helps
you should set your variable vdatetoday to num(date(year &'-'&month&'-'day) if you dont have the dimension day like '2013-08-04'
Marcus
Hi,
Try this,
=sum({<DateNum= {'>=$(=(Num(Date(Date, -15))))<=$(=(Num(Date(Date))))'}>} TotalPrice)
sum({<Date_Clean={">=$(=(Max(Date_Clean)-15))<=$(=Max(Date_Clean))"}>} TotalPrice)
If i do like this: I will get the last 15 days, and i can select dates (but it will only show the selected date)
my dimension date is like '2013-08-04'