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

Complex expression in Pivot Table

Hi,

I've data in the form attached(ques) & need output as attached(a pivot table)

The problem is that Year has dynamic values which can increase upto 'n' Columns & More cols are needed to be added to the pivot table which are independent of Year.

I think:

1) I've to use only one expression.

2) I can't use Year Dimension

I concatenated the data from two sources,the Typeid field distinguishes the concatenation which i added in the data to identify the sources

as you can see in the ques. that values for Year are blank for  TYPEID=2 but still it has to be shown in the same chart with the Year Values(which suggests that year can't be used as dimension,unless you guys have other ideas).

Note that there is only 1 row for 2014....but it can be more,infact Year can increase....(2015 till....n depending on the data)

Pls help

Regards

13 Replies
Not applicable
Author

Only the Years 2013 & 2014 have values.So it shud like as I pasted above in reply to Gysbert

Not applicable
Author

try this sum({<Year={2013,2014}>} Amount) what about the future.if you fix these years then in future some years of data will add means what will do

Not applicable
Author

the best solution for the user in this case is to have Year as Dimension and use sum(Amount) so that data for every possible Year Value is visible in future, otherwise using what you have mentioned means somebody has to check the possible values for year everytime the application is refreshed  & change the set which is a bad option.

Regards

Not applicable
Author

ya thats the smart way take year as a dimension in pivot table then drag & drop on top line. Thatsolve.