Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
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
jagan
Luminary Alumni
Luminary Alumni

Hi Vikas,

You can do it in Set Analysis, but it is bit difficult to handle, expression would be very complicate to understand.

Regards,

Jagan.

vikasmahajan
Author

Dear Sir

Tested this expression not working I am trying with variables as Mr.Jagan's suggested

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 Jagan

I have attach the sample application v1.qvw  can u help to arrive the same in this ?

Thanks

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.
perumal_41
Partner - Specialist II
Partner - Specialist II

Hi Vikas,

I have attached One Application .Check it is Correct or not

Regards

Perumal A

vikasmahajan
Author

Dear Sir,

Thanks for giving lot of help me first , I have try your expression but what I want is  like wise comparision

means  if today is 18 -mar-2013  vs   18-Mar-2012  data should display in your case last year month full

data is showing which is resulting wrong growth

Please see attachment of screen short for the same,.

Thanks again

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 Sir,

Thanks for giving lot of help me first , I have try your expression but what I want is  like wise comparision

means  if today is 18 -mar-2013  vs   18-Mar-2012  data should display in your case last year month full

data is showing which is resulting wrong growth

Please see attachment of screen short for the same,.

Thanks again

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.
perumal_41
Partner - Specialist II
Partner - Specialist II

Hi Vikas,

You are selected Year is 2012.So only coming 31/03/2012.you want to crrect means ,select Year 2013 or today date .after check is correct or not

Regards

Perumal A

vikasmahajan
Author

Dear Sir

Can u tell me how to use in set analysis

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 Sir

Can u tell me how to use in set analysis

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.
perumal_41
Partner - Specialist II
Partner - Specialist II

Hi vikas ,

Sorry for Delay,

Try like this expression ,

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

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

Sale)

I have only written  for Sale Value  . you try to Return value

Regards

Perumal A