Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Till Yesterday Count.

Hi All ,

Can any one help me with YTD logic

I need to take count of ID's till yesterday .

My data is from 1st May , 2016

I need the count of all ID's till yesterday i.e from 1st May to 14-06-2016 .(day before current date) in set analysis.

17 Replies
Not applicable
Author

Hi All,

Can any one help me with MTD logic, I need to take count of ID's till yesterday.

I have my data from 1st May 2016. I want count of all ID's from 1st June(current month) till yesterday i.e 15th June 2016.

Date Format is 'MM/DD/YYYY'.

Pls reply urgently.

Thanks in Advance .

PrashantSangle

Hi,

try this

Count({<DateField={">=$(=Date(Monthstart(Today()),'MM/DD/YYYY'))<=$(=Date(Today()-1,'MM/DD/YYYY'))"}>}Distinct id)



Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

Hi Max,

Above solution given by you is not working properly.

I've used max(date), still its not working.

This is my MTD logic:

count({$<DateField= {'>=$(=Max((MonthStart(DateField)))) <=$(=Max(DateField))'}>} ID)

Regards,

Ashvita.

PrashantSangle

Hi,

max() convert date to num so use date() before max()

modify it like

date(max(date),'MM/DD/YYYY')

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

Hi,

I've used below logic, but it is not giving correct count of ID's.

count({<DateField= {'>=$(=date(Max((MonthStart(DateField),'MM/DD/YYYY')))) <=$(=date(Max(DateField)-1,'MM/DD/YYYY'))'}>} ID)

plz suggest.

Regards,

Ashvita.

sunny_talwar

Try this:

Count({<DateField = {">=$(=Date(MonthStart(Max(DateField)),'MM/DD/YYYY'))<=$(=Date(Max(DateField) - 1, 'MM/DD/YYYY'))"}>} ID)

Not applicable
Author

Hi Sunny,

Its working..

Thanks a lot...for helping me out

Regards,

Ashvita.

sunny_talwar

No problem. I am glad Max and I were able to help you out.

Best,

Sunny