Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Thanks to all
Finally resolve with following link
http://community.qlik.com/message/313514#313514
Vikas
Have you tried this?:
(SUM({$<FiscalYear={$(=(max(FiscalYear)-1))}>}[Sales Invoice Qty])
-
SUM({$<FiscalYear={$(=(max(FiscalYear)-1))}>}[Sales Return Qty])
)/1000
Hello
Thanks For Immediate reply I have try the same but unfortunately I am not getting results .
any idea ?
Vikas
Can a sample app be posted?
No Application can be share.
Hi
Try like this
(SUM({1<FiscalYear={$(=max(FiscalYear)-1)}>}[Sales Invoice Qty])
-
SUM({1<FiscalYear={$(=max(FiscalYear)-1)}>}[Sales Return Qty])
)/1000
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
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.
Thx a lot for your quick answer.
I tried and unfortunately it doesn't work.