Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Have same weekly data and task to make a report for previous week relative to selected one.
Get data for selected week is easy task:
Sum({$<[WeekStartDate] = $([WeekStartDate])>}
// some complicated calculation here
)
For previous week hoped following code will do but failed:
Sum({$<[WeekStartDate]={"$(=(Num([WeekStartDate])))-7"}>}
// some complicated calculation here
)
I'm relatively new to Qlik Sense, so will be grateful for any help.
May be try this
Sum({$<[WeekStartDate] = {"$(=Date([WeekStartDate]-7, 'DateFieldFormatHere'))"}>}
// some complicated calculation here
)
Replace the DateFieldFormatHere with the format for WeekStartDate Field. Also, read here
Checked that:
As a WeekStartDate I have for example value 42912.
And it works great with other data fields calculations, but not with user selection.
What selections are making? Do you need a max function if there are more than one date?
Sum({$<[WeekStartDate] = {"$(=Date(Max([WeekStartDate])-7, 'DateFieldFormatHere'))"}>}
// some complicated calculation here
)
It is/will be selection of one week, therefore one date. Not an issue.
Difficult to know what might be wrong without taking a look