Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
vikasmahajan

U R G E N T - Set Analysis Help required

Dear All

I have following expression for calculating sales as per user selected month and year ,

I want to display same set of expression for last year as per user selected month and year  dynamically.

(SUM({$<FiscalYear={$(=max(FiscalYear))}>}[Sales Invoice Qty])

-

SUM({$<FiscalYear={$(=max(FiscalYear))}>}[Sales Return Qty])

)/1000

Thanks in advance

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.
1 Solution

Accepted Solutions
vikasmahajan
Author

Thanks to all

Finally resolve with following link

http://community.qlik.com/message/313514#313514

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.

View solution in original post

15 Replies
tresesco
MVP
MVP

Have you tried this?:

(SUM({$<FiscalYear={$(=(max(FiscalYear)-1))}>}[Sales Invoice Qty])

-

SUM({$<FiscalYear={$(=(max(FiscalYear)-1))}>}[Sales Return Qty])

)/1000

vikasmahajan
Author

Hello

Thanks For Immediate reply I have try the same but unfortunately I am not getting results .

any idea ?

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.
tresesco
MVP
MVP

Can a sample app be posted?

vikasmahajan
Author

No  Application can be share.

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.
MayilVahanan

Hi

Try like this

(SUM({1<FiscalYear={$(=max(FiscalYear)-1)}>}[Sales Invoice Qty])

-

SUM({1<FiscalYear={$(=max(FiscalYear)-1)}>}[Sales Return Qty])

)/1000

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
vikasmahajan
Author

I think this will not work  Set analysis will ignore user selection dimension if we use 1 identifier.

sum({1} Sales) =>  Returns total sales within the application, disregarding selections but not

the dimension.

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.
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

Below expression will work.

(SUM({$<FiscalYear={$(=Max(FiscalYear)-1)}>} [Sales Invoice Qty])

-

SUM({$<FiscalYear={$(=Max(FiscalYear)-1)}>} [Sales Return Qty])

)/1000

Make sure that you don't have any data issues.

Also shouldn't get divide by zero error means SUM({$<FiscalYear={$(=Max(FiscalYear)-1)}>} [Sales Return Qty]) expression should result zero.

tresesco
MVP
MVP

You can share your application without worring about data, look at this and this too.

vikasmahajan
Author

Thx a lot for your quick answer.

I tried and unfortunately it doesn't work.

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.