Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
jim_chan
Specialist
Specialist

how to create a MTD set analysis

Hi guys,

I have a data that have key in with future date and data. and i would like apply MTD for a KPI object.  This is my set analysis

Count({<Day=,Year=, Month=, Quarter=, Week=, Date=, DateNum={">=$(=Num(MonthStart(Max({<Day>}DateNum))))<=$(=Max({<Day>}DateNum))"}>} VISIT_KEY)

Now... after applying this, i dont understand why the MTD is 3 DEC 2017, that is the last record.

I would like to set the MTD, to calculate Month to Date, like now, is Feb 2017, suppose the MTD should be from 1 Feb til today 7 Feb.

How can i get that analysis with the above MTD set analysis?

Rgds

Jim

10 Replies
sunny_talwar

May be use Today() instead of Max(DateNum)

Count({<Day=,Year=, Month=, Quarter=, Week=, Date=, DateNum={">=$(=Num(MonthStart(Today())))<=$(=Num(Today()))"}>} VISIT_KEY)

But what is the point of doing till 7th if you only have data until 3rd?

jim_chan
Specialist
Specialist
Author

Hi bro, i got 0 Value.. i click anything also 0 .

any missing bracket in ur set analysis???

sunny_talwar

Doesn't seem like I missed any parenthesis.... not sure

jim_chan
Specialist
Specialist
Author

the data is until 3rd of DEC 2017... and the MTD is showing me this date's figure.

sunny_talwar

MTD is showing you this date's figure? for Dec 3rd 2017?

jim_chan
Specialist
Specialist
Author

yeah. and i max(date) - it shows ing 3rd Dec.

sunny_talwar

But I didnot even suggest you to use Max(Date).... I mentioned to use Today(). You cannot change to Today()?

jim_chan
Specialist
Specialist
Author

yes i did follow.  but shows me 0 value...nothing...

ount({<Day=,Year=, Month=, Quarter=, Week=, Date=, DateNum={">=$(=Num(MonthStart(Today())))<=$(=Num(Today()))"}>} VISIT_KEY)

sunny_talwar

Can't say... may be someone else might know