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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pivot table with value based in another value

Hello,

I have some values by week.

I want to show the week and two columns, one with the value of the week and another that shows the value of the week+2.

Ex.

Data

Week   WeekValue  

1               10

2               20   

3               30

4               40

5               50

6               60

I want to create a pivot table that includes a column that shows the value of the week+2. The result should be:

Week   WeekValue   NewColumn = Week +2

1               10            30                    Value of Week3

2               20            40                    Value of Week4

3               30            50                    Value of Week5    

4               40            60                    Value of Week6

5               50             ...

6               60             ...

...              ...              ...

Thanks in advance for your help.

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

If the expression for WeekValue is sum(WeekValue) then the expression for NewColumn is below(sum(WeekValue),2,1)


talk is cheap, supply exceeds demand
Not applicable
Author

Hello, The problem is that I have another dimension, I can't get the value by position.

Check my table below.

I have exchange rates by Year, Week and Currency. I'm showing the avg of the Exchange Rate by week and in the last column I want to show the avg for the week +12.