Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Kohli
Contributor

Comparison the past 3 Years sales

I have the table like::

ineNO      EmployeeID          StartDate                EndDate                    Salary

1                   1                  1/1/2008 00:00:00   31/12/2008 00:00:00 100000    

2                   1                  1/1/2009 00:00:00   31/12/2009 00:00:00 110000    

3                   1                  1/1/2010 00:00:00   31/12/2010 00:00:00 120000    

4                   1                  1/1/2011 00:00:00   31/12/2011 00:00:00 130000    

5                   1                   1/1/2012 00:00:00   31/12/2012 00:00:00 140000    

6                   1                   1/1/2013 00:00:00   31/12/2013 00:00:00 150000    

7                   1                   1/1/2014 00:00:00                                     160000    

8                   2                   1/4/2010 00:00:00   31/12/2010 00:00:00   35000     

9                   2                   1/1/2011 00:00:00   31/12/2011 00:00:00   36050     

10                  2                   1/1/2012 00:00:00   31/12/2012 00:00:00  37132     

11                  2                   1/1/2013 00:00:00   31/12/2013 00:00:00  38246     

12                  2                   1/1/2014 00:00:00                                      39393     

13                  3                   1/1/2008 00:00:00   31/12/2008 00:00:00  65000     

14                  3                   1/1/2009 00:00:00   31/12/2009 00:00:00  75000     

15                  3                   1/1/2010 00:00:00   31/12/2010 00:00:00  77250     


My Questions is

Employee Salary trend for the past 3 years. Increase and decrease are to be in different colours. in QlikSense

1 Reply
dwforest
Valued Contributor

Re: Comparison the past 3 Years sales

Use Previous in load script to add another column showing change.

If(EmployeeID = Previous(EmployeeID),Salary-Previous(Salary)) as SalaryChange

In your display, just set color based on positive or negative.

Community Browser