Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

comparing periods

Hi all,

I would like to compare the number of clients that made reservation in the last 30 days to the parallel time (between 30-60 days ago).

I tried using set analysis (below) to calculate number of clients who made a reservation in the last 30 days but it didn't work.

I tried in 2 ways:

1)

=count({<RsvDate={"<$(vToday)  >$(vToday)-30"}>}AgencyID)

i also created a variable vToday which is = today()

2)

tried to do this using today() function instead of variable

=count({<RsvDate={"$(<today())  $(>today()-30)"}>}AgencyID)

Appreciate your help, using this set analysis or in any other way (not in the script)..

thanks,

Naama

3 Replies
sunny_talwar

Do you have RsvDate as your dimension and are you hoping to see these two numbers in the same row?

sunny_talwar

Also, try these:

=Count({<RsvDate={"$(='<' & Date(vToday, 'DateFieldFormatHere') & '>' & Date(vToday-30, 'DateFieldFormatHere'))"}>} AgencyID)

vinieme12
Champion III
Champion III

or create the date buckets in your load script , <30 , 30-60 etc and use these in your Set expression

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.