Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all!
I have the following data:
Date and Value.
In table I want to get the Value for any Day, but alsoValue for the 7 days ago:
I use the expression: sum( {$<Day=,Month =,Date = {"$(=date(Date-7))"}>}Value ) but it doesn't work correctly.
In Qlickview like this:
For any date i must have 2 Values : Value for date and Value for date-7 ago but idon't know how to solve this problem without load two values in script. Can any help?
You can't solve this with set analysis expressions. Those are calculated once for the entire chart, not per row. If you have Values for every day and the dates are ordered like in your example you can use above(sum(Value),7) as the expression to get the sum(Value) of 7 rows above, which in this case is also 7 days ago.
Thank you, Gysbert ! It doen't suit mе..
Change your dimension to a calculate dimension with expression
=GetFieldSelections( Day) & '-' & GetFieldSelections( Month)
HI
PFA
Gysbert and Mayil, Thank you! Both of solutions show value when i select day and month.
Can i see value vs previous value for all days in month? I.e. if i select month, no selection day?
That's not possibly with set analysis expressions. The set is calculated for the entire chart/table, not per row. You'll have to deal with it in the load script. It's fairly easy. See attached example.
O'key, i understood, thank you,Gysbert!
Hi Gysbert,
Im using Qlikview personal edition. can i have the script paste here?
Many Thanks
Mazda