Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
gokulkothandan
Partner - Contributor
Partner - Contributor

Yearly Sales Trend - Display Last Year Sales for each year [Chart Expression] [Without Above Fn.]

Hi,

Below is my sample data set I have loaded inside Qlik Sense.

Year,Date,Sales
2016,2016-01-10,10000
2017,2017-01-10,12000
2018,2018-01-10,9000
2019,2019-01-10,15000

Need help in Plotting Last Year sales in Yearly trend ("Line Chart") like below using [Set Expression, AGGR] functions but without Above function.

Line.png

I require this because I need to display my Growth in Yearly trend compared to my LY Sales. 



4 Replies
Kashyap_R
Partner - Specialist
Partner - Specialist

Hi 

You can try previous / peek function in the backend and create a new column as previous year sales

 

Hope this helps

Thanks

Thanks and Regards
Kashyap.R
Gopi_E
Creator II
Creator II

hi,

you can use AddYear(Yearfield, -1) for getting previous year sales

for current year you can use YearStart(today(),0)

gokulkothandan
Partner - Contributor
Partner - Contributor
Author

Really appreciate your help @Gopi_E.

If possible can you help me with the exact expression to achieve this. I have already mentioned the sample data set above.

Thanks.

gokulkothandan
Partner - Contributor
Partner - Contributor
Author

Hi @Kashyap_R ,

I'm trying to achieve this using chart expression in measure. I'll also keep your solution in mind but if you can also come up with a solution that is completely based on chart expression, would be helpful.

Thanks