
Contributor II
2018-03-23
07:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
table operation in qlik
Hello,
I have this table:
date | X |
---|---|
12/2016 | 100 |
01/2017 | 200 |
02/2017 | 300 |
03/2017 | 400 |
04/2017 | 500 |
And the objective is :
date | X |
---|---|
12/2016 | 100 |
01/2017 | 100 |
02/2017 | 200 |
03/2017 | 300 |
04/2017 | 400 |
exemple: X= 200 - 100 ( 12/2016) = 100
X= 300 - 100 ( 12/2016) = 200
X= 400 - 100 ( 12/2016) = 300
Any suggestions please?
Regards,
443 Views
1 Solution
Accepted Solutions

MVP
2018-03-23
07:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Create a Straight Table
Dimension
date
expression
SUM(X)
IF(RowNo()=1,SUM(X),SUM(X)-top(SUM(X)))
make sure that you sort your table by date
405 Views
1 Reply

MVP
2018-03-23
07:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Create a Straight Table
Dimension
date
expression
SUM(X)
IF(RowNo()=1,SUM(X),SUM(X)-top(SUM(X)))
make sure that you sort your table by date
406 Views
