Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 carolin01
		
			carolin01
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello together,
I´m trying to show some expressions in my chart only conditionally. Therefore I created in my script a table that I use in a list box:
LOAD * INLINE [_DisplayChartReference, _references
    1, Plan,
    2, YTD,
    3, Outlook,
]; 
Now my expression in my chart has the following condition:
SubStringCount(Concat(_DisplayChartReference, '|'), 1)
I also tried:
SubStringCount(Concat(_references, '|'), 'Plan')>1,1,0)
But both doesn´t work. I already created a self report with a pivot table. Here this worked well and therefore I don´t understand what I´m doing wrong?
Many thanks for your help 🙂
Best regards,
Carolin
 Gysbert_Wassena
		
			Gysbert_WassenaPerhaps: SubStringCount(Concat(_DisplayChartReference, '|'), '1')
The second won't work without an if:
=if(SubStringCount(Concat(_references, '|'), 'Plan')>1,1,0)
 Gysbert_Wassena
		
			Gysbert_WassenaPerhaps: SubStringCount(Concat(_DisplayChartReference, '|'), '1')
The second won't work without an if:
=if(SubStringCount(Concat(_references, '|'), 'Plan')>1,1,0)
 
					
				
		
 sunilkumarqv
		
			sunilkumarqv
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		try this
In the dimension properties, check the option for “Enable Conditional” and enter the following code
You will want to add similar code to each dimension, changing the letter to correspond with what you used in your inline table.
=SubStringCount(Concat(_references, '|'), 'Plan')
The last thing to do is add a Calculation Condition to the general tab of the object so that the object only displays when at least one dimension and expression is selected:
GetSelectedCount(_DisplayChartReference)>0 AND GetSelectedCount(_Expression)>0
 
					
				
		
 simondachstr
		
			simondachstr
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		This document I wrote on substringcount could be useful for your implementation:
 
					
				
		
 carolin01
		
			carolin01
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thank you both, both worked well. Maybe you could help me with another question:
My list box has got three values that I will connect to the expressions:
Plan, YTD and Outlook
Right now, if nothing is selected then all three expression appear. I would like to have the oposite: Only if Plan, YTD or Outlook is selected the expression should appear. Is this possible?
 Gysbert_Wassena
		
			Gysbert_WassenaSunil already posted the answer to that in his last post. You can use the getselectedcount function for that.
 
					
				
		
 carolin01
		
			carolin01
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Sorry right, I see. Thank you
