Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Upali_Wijearatne
Contributor III
Contributor III

Pivot Table

Hi

I have created a pivot table in qvw file with available data and it is as follows

Upali_Wijearatne_0-1704438328878.png

The records in black are already in my pivot table and I want add the records in Red to my table. But I am unable to do it . Kindly help me achieve it please.

Labels (1)
10 Replies
marcus_sommer

Within the script you may add the following load-statement:

concatenate(MyProductTable) load 'Total' as Product autogenerate 1;

which extends the product-field.

Further enable all partial sums within the pivot and add two new expressions of:

dimensionality()

secondarydimensionality()

which will return the layer-order of all included dimensions. These order could be queried for your real calculation to branch appropriately.

Like already hinted the replacement of the Year with expressions could be simplify the matter which would require at least 3 expressions with something like:

sum({< Year = {2022}>} Value)
sum({< Year = {2023}>} Value)
sum({< Year = {2023}>} Value) / sum({< Year = {2022}>} Value) - 1

Just play a bit with the examples and you will soon get the wanted information.