Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 bertrand_herard
		
			bertrand_herard
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
When using a synthetic Dimension in a chart with functions like ValueList() ou ValueLoop(). Is there any way to display the current dimension value in Expressions ?
(I’m using Rowno() function but I would like to get the Dimension Value).
Regards
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Set analysis gets evaluated once for an objcet(NOT row-wise), try with 'if' like:
=If(ValueLoop(2010,2014)<=2013,
sum(If(Year=ValueLoop(2010,2014),Value)),
sum(If(Year=ValueLoop(2010,2014)-1,Value))
)
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Use the same valuelis()/valueloop() expression in the expression tab. Like:
Dimension: ValueList(1,2)
Expression: ValueList(1,2)
 bertrand_herard
		
			bertrand_herard
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		As far as I know, ValueList and ValueLoop functions do not work in Expressions in graph, are they ?
If I'm wrong, can you please send me a little example ?
Regards
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Yes, they do. It would be better, if you could explain your requirement in more details with a sample qvw.
 bertrand_herard
		
			bertrand_herard
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Here is what I'm trying to do : in a grah
I've a calculated dimension in a graph with value = ValueList(2010,2014).
In Expressions i'd like to have a difference behaviour depending of the current value of valuelist (exemple :
If ValueList current value <=2012, the expression returns the same value as the valuelist, if ValueList>2012 the expressions returns Valuelist value -1.
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try this in expression:
=If(ValueList(2010,2014)<=2012, ValueList(2010,2014), -1)
 
					
				
		
 MarcoWedel
		
			MarcoWedel
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		=If(ValueList(2010,2014)<=2012, ValueList(2010,2014), ValueList(2010,2014)-1)
 
					
				
		
 MarcoWedel
		
			MarcoWedel
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		or
=ValueList(2010,2014)+(ValueList(2010,2014)>2012)
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Did he mean that? . Hope he understood how it works and modified according to his requirement.
. Hope he understood how it works and modified according to his requirement.
 bertrand_herard
		
			bertrand_herard
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thanks your answers helped me,
I've manage to build my expression =If(ValueLoop(2010,2014)<=2012, ValueLoop(2010,2014), -1).
Unfortunately my final goal was to put this expression in a Set Analysis like this :
sum({<Year={
If(ValueLoop(2010,2014)<=2012, ValueLoop(2010,2014), -1)
}> MyIndic)
I've an issue :  if I use the expression in $()  it evaluate only one value of it for the whole table /graph 
Any idea about this ?
Regards
