Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
chanin7893
New 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
Valued Contributor III

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

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

silambarasan130
Contributor III

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

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.

Community Browser