Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

New Contributor

How to subset a Pivot Table ?

Hi all, 

I have an item list per department along the different ordered quantities and price per item over different periods.
I need to compute the inflation rate between two periods.
The formula : Qty_N(Price_N - Price_N-1) / (Qty_N*Price_N-1)  
i can show it with two pivot table :


DepartmentItemQty ordered 2016Qty ordered 2017Price 2017Inflation rate

Dimensions: Department , Item [Light Blue]
Expressions :
     -Qty : sum(<year=2016>qty)
     -Price : avg(<year=2017> price)
     -Inflation: as formula


DepartmentItemYearQty ordered Price Inflation rate

Dimensions: Department , Item, Year

Expressions :

     -Qty : sum(qty)

     -Price : avg(price)

     -Inflation: as formula but using above function : { col(1) * [col(2)-above(col(2))] } / { col(1) * above(col(2))}


However, I want to compute the average rate of inflation per department
If I just remove the dimension Item, Qlik will simply add all quantities per year, regardless of their presence in succesive years or not ==> Wrong result.

Thus I would like to know how can I subset one of the pivot table to show only the right row.

Data Source:
Qvd file of all retail transactions regarding orders: which item ordered to supplier plus quantity,price,date etc...

Thanks a lot for your attention.

1 Reply

Re: How to subset a Pivot Table ?

You can remove dimension and use an Aggr() function to get what you might be looking to get?

Community Browser