Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
if I want to capture last year or last month or last week or last 10 days result, how to use data functions in script?
thank you in advance!
Perhaps you have to make it a bit more clear about your requirement.
Your best bet is probably Set Analysis, something like:
=sum({<MyDate={">=$(=MonthStart(AddMonths(max(MyDate), -1)))"}>}MyValue)
or
=sum({<MyDate={">=$(=Date(max(MyDate) - 10))"}>}MyValue)
But, point in time reporting, especially matching dates in Set Analysis can be slightly tricky, so I would suggest looking at a few examples. This is one I have put together that you may find useful:
QlikView App: Set Analysis - Prior Period Comparison
Cheers,
Steve
You have to go for SET analysis or you can use the variables with the data functions for obtain the last date values.