Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
m_perreault
Creator III
Creator III

YTD,QTD, MTD

I am using the some basic training exercises in the Sales Discovery app that comes with Qlik sense.  I am trying to figure out how to calculate YTD, MTD, and QTD sales.   Can anyone help?

4 Replies
m_perreault
Creator III
Creator III
Author

Hey Sunny can you please help stalwar1

sunny_talwar

Can you share where exactly are you trying to do this and what exact issue you are running into?

md_qlikview
Creator II
Creator II

Hi Mark,

you can refer following straightforward set expressions to calculate YTD MTD & QTD

YTD

= sum({< CalDate= {">=$(=Date(YearStart(max(CalDate))))<=$(=max(CalDate))" }, CAL_Week= , CAL_Quarter=, CAL_Month= >} Sales)

MTD

=Sum({<
CalDate= {">=$(=Date(MonthStart(Max(CalDate))))<=$(=max(CalDate))"},CAL_Week= ,CAL_Year=, CAL_Quarter=>}Sales)

QTD

=sum({<CalDate={">=$(=QuarterStart(max(CalDate)))<=$(=max(CalDate))"},CAL_YEAR=,CAL_Month=,CAL_Quarter=,CAL_Day=>}Sales)

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Which training materials specifically are you using?  QS 3.2 allows the creation of "Calendar Measures" by right-clicking the "Sales Amount" field in the Fields Assets.  However, the Sales Discovery app that I have with 3.2 Desktop was not properly setup for this. Do you have the source files to be able to reload it?

-Rob

http://masterssummit.com

http://qlikviewcookbook.com