Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to learn Qlik Sense (Cloud version).
What kind of expression would I use to create a weekly dimension for a line/area chart, where the first week starts on a date specified by the user?
Regards,
Chris
Hi Chris,
This sounds somethings like:
- create 2 variables: vStartDate, vEndDate
- create 2 calendar objects: 1st object choose vStartDate variable as the field to use, 2nd object choose vEndDate variable... for the Min and Max boxes in both calendar objects, you can put something like: =Min(YourDateField), =Max(YourDateField)... after this is completed, the user should now have 2 calendar objects to define the range you want your line chart to reflect
- In the line chart, add a calculated dimension: Week(YourDateField)
- In the expression, add: Sum({< YourDateField = {">=$(=Date(vStartDate))<=$(=Date(vEndDate))"} >} ValueField)
Hope this helps.
Thanks,
Ben
If you only need a start date, then just change your expression to: Sum({< YourDateField = {">=$(=Date(vStartDate))"} >} ValueField)