Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Select the what I want to see in Pivot table and sorting.

Hi QlikView Community

I have one issue I am trying to solve. I have this simple dataset.

           

        Year     Customer Revenue Code  RevenueNumber of Containers
20151        Service     1.764.209     1744
20151       Handling    3.340.318     1718
20151      Transport    9.530.124     1881
20151        Other    6.456.502     934

I want to compare customers and am comparing each customer to revenue/Number of Containers.

1) But I want to only focus on three Revenue Code that is Service, Handling and Transport.

I  want to exclude the other revenue code in my pivot table.

2) Secondly I want to sort the Revenue Code in this order Transport, Handling and Service.

I want my pivot table to look like that

  

CustomerRevenue CodeTransportHandlingService Total
3 8.1763.8772.9584.619
2 1.1462.3932.0182.460
1 4.8111.1963.2813.542
4 4.4923.0046.7734.434
Total 4.3152.5593.5783.701

regards Darri

1 Solution

Accepted Solutions
marcus_sommer

You could filter your dimension with an expression like:

if(match([Revenue Code], 'Transport', 'Handling', 'Service'), [Revenue Code])

and hide NULL on this dimension and for sorting them you could use a sort-expression like:

pick(match([Revenue Code], 'Transport', 'Handling', 'Service'), 1,2,3)

Another way of sorting could be to influence the load-order of this field with a dummy-load but this isn't an option if you need the sorting one time in this way and another time in that way.

- Marcus

View solution in original post

2 Replies
marcus_sommer

You could filter your dimension with an expression like:

if(match([Revenue Code], 'Transport', 'Handling', 'Service'), [Revenue Code])

and hide NULL on this dimension and for sorting them you could use a sort-expression like:

pick(match([Revenue Code], 'Transport', 'Handling', 'Service'), 1,2,3)

Another way of sorting could be to influence the load-order of this field with a dummy-load but this isn't an option if you need the sorting one time in this way and another time in that way.

- Marcus

Kushal_Chawda

Use set analysis instead of calculated dimension

Create Pivot Table

Dimension:

Customer

Revenue code

Expression:

=Sum({<[Revenue code]={'Transport', 'Handling', 'Service'}>}Revenue)

Drag the revenue code dimension over expression horizontally

go to Presentation tab-> check Partial sum option for [Revenue code]