Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
SG2603
Contributor
Contributor

Custom field in Pivot Table

Hi,

I am looking for help in creating custom columns in pivot table in Qlik Sense. I have created a pivot table with the following details:

Rows: Country, Product

Columns: Year-months (201702 - 201901)

Measure: Sum of Sales

Now the need is to add 3 more custom columns at the right end of the pivot table:

Column 1: Current moving annual total of sales (Sum of sales for year-months 201802 - 201901)

Column 2: Previous moving annual total of sales (Sum of sales for year-months 201702 - 201801)

Column 3: Change % (Current MAT / Previous MAT - 1)

Unfortunately, I have so far not been able to figure out any possible ways of implementing this.

I have attached the QVF that i built for this purpose.

Any help or direction would be much appreciated.

Labels (1)
2 Replies
AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Hi,
You can try concatenating 3 dummy inline values to "Year-Months" field and handle expression using 'IF' on chart.

Thanks,
Ashutosh
Channa
Specialist III
Specialist III

u can use Value List hear is sample 

u can try

 

Dimension Row : Company

Column : ValueList('Col1','Col2','Col3')

Measure :

pick(match(ValueList('Col1','Col2','Col3'),'Col1','Col2','Col3'),
sum({<DIM={'Col1'}>}value),
sum({<DIM={'Col2'}>}value),
(sum({<DIM={'Col3'}>}value)-sum({<DIM={'Col3'}>}value))
)

Channa