Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
er_mohit
Master II
Master II

YTD, MTD, QTD, WTD Logic as compare to Last Year

Hi

M stuck off facing this problem to analysis with Last Year comparison

I m using the expression using set analysis.

I m giving you an overview that my calendar starts from  1st jan every year and week based on Friday to Saturday. So, my date should be different if i compared it with last year.

In every month having 4 weeks but for every quarter end has 5 weeks.

So, my Month field based on weeks.

Suppose today is : 13-11-2014 (13 November 2014)

So, for case of YTD it should be fine for comparing Current year and previous year

but for MTD : November Month 25-10-2014 to 13-11-2014 (Count of days is 20)

Should be fine for current year

but for making the logic last year November Month (LYMTD😞 i want 20 days of sale irrespective of whole month count like

Time period 26-10-2013 to 14-11-2013 count days is 20 (So it based on Days irrespective of Date Field)

QTD :

Current year having 48 days (Sum Sale)

Last yr(LYQTD) -  Also want 48 days ( (Sum Sale) )

WTD (47):

Current Year(WTD) :having 6 days

Last Year(LYWTD) also want 6 days for calculating the Sum(Sale)


Any help will be appreciable.


Regards

Mohit

22 Replies
tresesco
MVP
MVP

Hi Mohit,

Create and share a sample qvw (if possible with inline sample data) that demonstrates your issue. And perhaps a new thread creation would be a better idea to get more attention.

er_mohit
Master II
Master II
Author

Hi tresesco,

Please find attached.

Thanks

Mohit

er_mohit
Master II
Master II
Author

Hi tresesco

Please give any suggestion.

I really appreciate any help from your side.

Thanks

Mohit