Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to calculate Last year Sales

Hi All,

I am building a Qlikview App and i have to do TY Sales Vs LY Sales for a month .To calculate LY sales i have created 2 new variables as

vmaxDateIDLY = DateId_LY ( which gives the last year date)

vLY_CurrDate = [Fiscal Year]=, [Fiscal Qtr]=, [Fiscal Half]=, [Fiscal Month]=, [Week End]=,Date=, [Fiscal Week]=, [FiscalWeekDesc]=, DateId={$(vmaxDateIDLY)}

And inside the expression i have something like this

sum({$<$(vLY_CurrDate)>}Sales) .

The output i get is i see a new row in the bottom for the LY date of current date with the sales and remaining all dates as zero's.However if i pick a single date then i get a new row on the top of select date which has last year date and sales .

How do i get the LY sales in the same row rather than getting a new row?

Thanks

24 Replies
Not applicable
Author

there is only one date present here, and i cannot open the previous one

Not applicable
Author

i think we have TY date was well as LY date so we should be good ?

Thanks

Not applicable
Author

im not sure i quite follow you..

But look at this SS. The sales are still the same for the different dates.Capture.PNG.png

Not applicable
Author

Hi Thomas,

Do you have any idea of why the sales are same for last year also? Because i do have sales for last year which are different from this year?

Thanks

Not applicable
Author

MMaybe because it is reduced data?