Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
chanin7893
Partner - Contributor III
Partner - Contributor III

Count of products for the last 3 days i.e today, yesterday & a day before yesterday using set analysis ??

I would like to find the "Count of Products" for the last 3 days i.e today, yesterday and a day before yesterday using set analysis. It should be dynamic so that as the days change I can get the information of the current day and the previous 2 days as well.

Thanks in advance.

2 Replies
rahulpawarb
Specialist III
Specialist III

Hello Chanin,

Hope you are doing good!

Below is draft expression using set analysis to fulfill your requirement:

COUNT({<Date={">=$(=Today()-2) <=$(=Today())"}>}Product_id)

If you have any queries then let me know.

Regards!

Rahul

Silambarasan1306
Creator III
Creator III

The below expression will give the expected ans.

COUNT(Distinct {<Date= {">=$(=Date(Max(Date)-2))<=$(=Date(Max(Date)))"}>} Products)

or Else

COUNT(Distinct {<Date= {">=$(=Date(Today()-2))<=$(=Date(Today()))"}>} Products)

Date - Change the column as per your convenience.