Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 PradeepReddy
		
			PradeepReddy
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
 
					
				
		
 jyothish8807
		
			jyothish8807
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Pradeep,
Try this:
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
];
Left join
B:
Load
distinct
Parent_CustID,
AutoNumber(Parent_CustID) as ID
resident A;
Left join
Load
ID,
CustID as NewCustID
resident A;
 
					
				
		
 jyothish8807
		
			jyothish8807
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Just use 'NewCustID' in the list box and 'CustID' in pivot as dimension 🙂
 PradeepReddy
		
			PradeepReddy
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 
					
				
		
 jyothish8807
		
			jyothish8807
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Pradeep,
From this logic we are creating only one new field 'NewCustID' also since the values are same as CustID it will not increase the size of the app much.
It will increase the load time for sure 🙂
 PradeepReddy
		
			PradeepReddy
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 
					
				
		
 jyothish8807
		
			jyothish8807
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Pradeep,
Just removed the left join, now the sum will be correct 🙂
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
];
Left join
B:
Load
distinct
Parent_CustID,
AutoNumber(Parent_CustID) as ID
resident A;
Left join
Load
ID,
CustID as NewCustID
resident A;
 shreya_nadkarni
		
			shreya_nadkarni
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 PradeepReddy
		
			PradeepReddy
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		if we take other filter/chart, when we select the data from NewCustID, it will give you wrong results.
Might be I missed to mention in my earlier post, there are other filters/ charts in the dashboard.
to illustrate the same, I have added one Country field, please see the attachment.
 PradeepReddy
		
			PradeepReddy
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I have to use one list box only to select the customer, either NewCustomerID or Cust_ID
