Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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
bwisealiahmad
Partner - Specialist
Partner - Specialist

Why not create a current month flag instead?

If(Month(Date) = Month(Today()), 1, 0) as [DateCurrentMonthFlag],

And use that in your set analysis?