Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 greend21
		
			greend21
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I have an IF statement as a variable in set analysis. I want it to show both Assigned and Completed items if nothing else in this field is selected but I am unable to figure this out.
This is what I tried:
vHideUnassigned = If(GetSelectedCount(AssignedCompleted) = 0, 'Assigned' and 'Completed', GetFieldSelections(AssignedCompleted))
Measure in Chart:
Count({<AssignedCompleted={'$(=$(vHideUnassigned))'}>}AssignedCompleted)
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Or this
If(GetSelectedCount(AssignedCompleted) = 0, Count({<AssignedCompleted = {'Assigned', 'Completed'}>}AssignedCompleted), Count(AssignedCompleted))
 
					
				
		
 patilamay
		
			patilamay
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Dan,
Can you tell me what does AssignedCompleted field contain?
And I think you got your if statement wrong for vHideUnassigned variable.
It can be like this
vHideUnassigned = If(GetSelectedCount(AssignedCompleted) = 0, 'Assigned'&chr(44)& 'Completed', GetFieldSelections(AssignedCompleted))
This should give you two results for the variable.
HTH
Thanks,
 
					
				
		
 sasiparupudi1
		
			sasiparupudi1
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		vHideUnassigned = If(GetSelectedCount(AssignedCompleted) = 0, Chr(39)& 'Assigned' & Chr(39)&chr(44)& Chr(39)&'Completed'& Chr(39),GetFieldSelections(AssignedCompleted))
Count({<AssignedCompleted={"$(=vHideUnassigned)"}>}AssignedCompleted)
 
					
				
		
 sasiparupudi1
		
			sasiparupudi1
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		great, please close this thread by marking a correct and any helpful answers
 greend21
		
			greend21
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		This did not work. I'm thinking it still must have something to do with all the quotes .
 greend21
		
			greend21
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		This field contains the values Assigned, Unassigned, and Completed. I want these two values returned so that my chart will default to having these two items displayed, but will also allow changes in selection from the listbox . It may have something to do with the way the variable is in the set analysis but this isn't displaying anything on my chart. I'm trying to figure out how to get the quotations rights as I think that might be the issue.
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be this
Count({<AssignedCompleted *= {'Assigned', 'Completed'}>}AssignedCompleted)
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Or this
If(GetSelectedCount(AssignedCompleted) = 0, Count({<AssignedCompleted = {'Assigned', 'Completed'}>}AssignedCompleted), Count(AssignedCompleted))
 greend21
		
			greend21
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		This was a different way at looking at the expression that I had not considered but it is a good idea and also much less complex to look at. Thank you!
