Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Comparing data between years

I currently have my data of sales set out in a spreadsheet as below:

YearActual SalesSales TargetMonth
2013/14££££££££1
2013/14££££££££2
2014/15££££££££1
2014/15££££££££2

I want to show the data as a gauge and so how would I write the expression that would compare sales between one year and the next?

Thanks

1 Reply
JonnyPoole
Employee
Employee

Here is a sample using SET ANALYSIS to dynamically calculate the most recent year in the user's selection and show that year's actual sales as the needle in the gauge while adding a green reference line to denote the previous years actual sales

Also attached is the QVF for your inspection. Just put it in your  My Documents\qlik\sense\apps directory to see it in the destkop hub.

Note that on load i parsed your Year values to just show the first four characters ( ex:  2013/14 ->  2013)  . That made it easy to calculate the most recent year in the user's selection (ie:  max(year)  and previous year (ie :  max(year)-1)  . 

You can load both year formats and use a different field name for each if you want .

hope it helps

Capture.PNG.png

Capture1.PNG.png

Capture2.PNG.png