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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

YTD,MTD,WTD

Hi to All,

I have confusion following calculation

I want find out YTD, MTD and WTD Please help me out this issue.

Sum({<Year=, Month=, Quarter=, Week=, DateField=, DateNum={">=$(=Num(YearStart(Max(DateNum))))<=$(=Max(DateNum))"}>} Sales)

Here what can i use instead of DateField and DateNum

Please explain to me

I have Date field like "BILLDATE".

Where can i mention in above expression.

I have two variables like (1).vStartDate

                                   (2).vEndDate

and i have fields like MinOrddate & MaxOrdDate in script

Please help me out this issue.

Thanks in Advance

Regards

Chandra.

Labels (1)
2 Replies
MK_QSL
MVP
MVP

YTD

SUM({<

     Year =, Quarter=, Month=, Week=, BILLDATE=,

     BILLDATE={">=$(=Date(YearStart(Max(BILLDATE))))<=$(=Date(Max(BILLDATE)))"}

>}Sales)

Use MonthStart instead of YearStart for MTD

and

Use WeekStart instead of YearStart for WTD

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

It will be much easier if you could calculate your YTD, MTD, and WTD flags in the script and use them in Set Analysis. Far simpler and faster.

cheers,

Oleg Troyansky

Come and learn Set Analysis and Advanced Aggregation with me at www.masterssummit.com - take your QlikView skills to the next level!

Ask me about Qlik Sense Expert Class!