
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Issue with dates in set analysis
Hello,
I want to create some set analysis expressions in order to do Current YoY and Previous YoY date comparisons on the fly.
I have defined these 4 variables in my load script:
Set vCurrentYTDStart = Date(YearStart($(vCurrentYTDEnd)), 'DD/MM/YYYY');
Set vCurrentYTDEnd = Date(Max([Trade Date]), 'DD/MM/YYYY');
Set vPreviousYTDStart = Date(AddYears($(vCurrentYTDStart), -1), 'DD/MM/YYYY');
Set vPreviousYTDEnd = Date(AddYears($(vCurrentYTDEnd), -1), 'DD/MM/YYYY');
So if a user selects a Trade date, then the dates would change depending on the selection.
But my set analysis expression below isn't working. Any ideas? Currently using a recent version of Qlik Sense.
Sum({$<[Trade Date] = {">=$(=$(vCurrentYTDStart))<=$(=$(vCurrentYTDEnd)))"}>} [Sales])
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Check how you dates are formatted.
If you think that's not the issue, please upload sample data.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Check how you dates are formatted.
If you think that's not the issue, please upload sample data.
