Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
PradeepReddy
Specialist II
Specialist II

Pivot Table Display

Hi all,

Good day..

My data looks like below.

CustID,Parent_CustID,Measure1,Measure2,Country
Cust1, Cust1, 10, 20, Country1
Cust2, Cust1, 11, 21, Country2
Cust3, Cust1, 12, 22, Country2
Cust4, Cust4, 13, 23, Country3
Cust5, Cust6, 14, 24, Country4
Cust6, Cust6, 15, 25, Country4
Cust7, Cust7, 16, 26, Country4
Cust8, Cust7, 17, 27, Country5
Cust9, Cust9, 18, 28, Country6

Requirement:

I have a list box with CustID for selections. 

I have pivot table with dimensions.. Parent_CustID & CustID in same order; Expressions: Sum(Measure1)... 10 measures.

When I select any value from List box(CustID), the pivot table should showcase all the customers with in the group(Parent_CustID).

Expected Output:

1) When I select Cust2 in the list Box, the pivot table has to show below info.

CustID,Parent_CustID,Measure1,Measure2
Cust1, Cust1, 10, 20
Cust2, Cust1, 11, 21
Cust3, Cust1, 12, 22

2) When I select Cust4 in the list Box, the pivot table has to show below info.

CustID,Parent_CustID,Measure1,Measure2
Cust4, Cust4, 13, 23

as there are lot of expressions/measures, I am trying to restrict the data at dimension level.

Edited:  Dashboard contains a lot of filters and other charts. The above stated scenario applies to only one pivot chart. In rest of the charts/filters, should show normally i.e. when I select Cust2 , it should reflect Cust2 related data only. To illustrate this I have added one more dimension Country to the data sample.

Thanks in advance

Labels (3)
12 Replies
shreya_nadkarni
Partner - Creator
Partner - Creator

Hi,

You can try this script.

A:
LOAD * Inline [
CustID,Parent_CustID,Measure1,Measure2
Cust1, Cust1, 10, 20
Cust2, Cust1, 11, 21
Cust3, Cust1, 12, 22
Cust4, Cust4, 13, 23
Cust5, Cust6, 14, 24
Cust6, Cust6, 15, 25
Cust7, Cust7, 16, 26
Cust8, Cust7, 17, 27
Cust9, Cust9, 18, 28
];


B:
Load
distinct
Parent_CustID,
CustID as new_id
resident A;

Thanks,

Shreya

 

PradeepReddy
Specialist II
Specialist II
Author

1st pivot showing correct info..
2nd pivot (having only 'Cust2') not showing correct numbers, it should show 11 and 21 respectively.
2nd table you can consider as simple table for simplicity purpose.

appreciate your efforts.
shreya_nadkarni
Partner - Creator
Partner - Creator

Hi,

If there is single selection for New Id

Then the detail info will show the output(Attached qvw).

Expression modified.

Thanks.