Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 User13
		
			User13
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
I am trying to filter values based on selection from a drop down list in a way that if employee "B" is selected from dropdown list, table should show employee "B", his supervisor "A" and his direct reportees "C" and "D"
= IF([Supervisor ]='$(=GetFieldSelections(list))' OR [Employee]='$(=GetFieldSelections(list))'
OR [Employee]= (IF([Employee]='$(=GetFieldSelections(list))',[Supervisor ])),[Employee])
This expression is returning employee "B" and his reportees but not his supervisor
Looks like there is some issue in this part
[Employee]= (IF([Employee]='$(=GetFieldSelections(list))',[Supervisor ]))
Can you please help to resolve this
| Employee | Supervisor | 
| A | |
| B | A | 
| C | B | 
| D | B | 
| E | C | 
 edwin
		
			edwin
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Assuming you are building a chart,
this gets you all the subordinates:
= count(DISTINCT {<Employee=, Supervisor={'$(=only(Employee))'}>}Employee)
this gets the supervisor:
= count(DISTINCT {<Employee=p({<Employee={'$(=only(Employee))'}>} Supervisor)>}Employee)
you can of course extrapolate from this using concat, etc..
hope that helps
 Kushal_Chawda
		
			Kushal_Chawda
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		@User13 try below
Create variable vEmployees on frond end with below expression
=Concat(distinct chr(39)&Employee&chr(39),',')
Then create below expression. Note that Employee and supervisors both should present in dimensions
=Count({<Employee+=p({1<Supervisor={$(vEmployees)}>}Employee)>}Employee)
You can also use the set in actual expression. Let's say you have measure as Sum(Salary) then use below
=sum({<Employee+=p({1<Supervisor={$(vEmployees)}>}Employee)>}Salary)
 Kushal_Chawda
		
			Kushal_Chawda
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		@User13 use distinct keyword in concat function.. updated expression
 User13
		
			User13
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Edwin,
Thanks for your reply.
I am working on Org chart and trying to create functionality to search employees by name using dropdown list. I think we have to perform this in dimension field.
Thanks
 User13
		
			User13
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Kush,
Thanks for your reply.
I am working on Org chart and trying to create functionality to search employees by name using dropdown list. I think we have to perform this in dimension field.
Thanks
 Kushal_Chawda
		
			Kushal_Chawda
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		@User13 As I mentioned , You can add the Dimensions in your chart (Employee & Supervisor) and then add the measure with set as I mentioned. You can provide filter of Employee to select any value.
