Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
vikasmahajan

Set Analysis Help Required for expression

Dear all

I have following expression for like wise comparision between  28/02/2013 vs  29/02/2012  (Current Year and Previous Year)

but  when I compare 28 feb month with last year 28  likewise analysis is wrong   , I want to show sales of  current year feb with last year

feb as we know last year feb was leap year

Can any one help me in this regards.

My expression is follows:

 

=(SUM({$<FinancialYear=,Quarter=,MonthName=,FiscalYear={$(=max(FiscalYear)-1)},

[Posting Date]={">=$(=YearStart(max([Posting Date]),-1,4))<=$(=addmonths(max({$<FiscalYear={$(=max(FiscalYear))}>}[Posting Date]),-12))"}>}

[Stat Sales Amount])

-

SUM({$<FinancialYear=,Quarter=,MonthName=,FiscalYear={$(=max(FiscalYear)-1)},

[Posting Date]={">=$(=YearStart(max([Posting Date]),-1,4))<=$(=addmonths(max({$<FiscalYear={$(=max(FiscalYear))}>}[Posting Date]),-12))"}>}

[Stat Return Amount])

)/100000

Thanks

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
21 Replies
vikasmahajan
Author

Dear Sir

I try your expression it is ok in demo application which I share but not giving result in Live application

I have attach screen short for the same.

I think Date( )  function is giving some problem . Please refer expr.jpg file you will come to know what is problem

ANy Help ?

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
vikasmahajan
Author

Dear All

My problem of leap year is resolved with following Posthttp://community.qlik.com/message/39730#39730

Qlikview Have Great Features for handling leap year

Thanks !!1

Regards

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.