Discussion Board for collaboration related to QlikView App Development.
Hi,
I have a chart with a date field as the dimension. I want the range always be from the date of today until 2 weeks back.
How can I achieve this?
Hi Nazeem,
Instead of doing in dimension you can try the same in Expression, Calculated Dimension will have performance issues.
=Sum({<MyDate ={'>=$(=Date(Today()-14))<=$(=Today())'}>} MeasureName)
This is a good practice instead of doing it in Dimension.
Regards,
Jagan.
Write as dimension:
If(Num(MyDate) <= Num(Today()) and Num(MyDate) >= Num(Today()-14), MyDate, null())
let me know
Hi,
You can set the range from chart properties Axes tab.
Min = Date(WeekStart(Today())-14)
Max = Today()
In the chart, the dimension is shown as numbers and not as dates.
HI Nazeem
use floor function to convert number to date
regards
padma
Amend that dimension:
=Date(If(Num(MyDate) <= Num(Today()) and Num(MyDate) >= Num(Today()-14), MyDate, null()))
so write simply:
If(Num(MyDate) <= Num(Today()) and Num(MyDate) >= Num(Today()-14), Date(MyDate), null())
Hi Nazeem,
Instead of doing in dimension you can try the same in Expression, Calculated Dimension will have performance issues.
=Sum({<MyDate ={'>=$(=Date(Today()-14))<=$(=Today())'}>} MeasureName)
This is a good practice instead of doing it in Dimension.
Regards,
Jagan.
Thank you!