Skip to main content
Announcements
Marching toward a simplified navigation! READ ON
cancel
Showing results for 
Search instead for 
Did you mean: 
bertrand_herard
Partner - Contributor III
Partner - Contributor III

Getting current value of valueList or valueLoop

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

1 Solution

Accepted Solutions
tresesco
MVP
MVP

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))

)

View solution in original post

12 Replies
tresesco
MVP
MVP

Use the same valuelis()/valueloop() expression in the expression tab. Like:

Dimension: ValueList(1,2)

Expression: ValueList(1,2)

bertrand_herard
Partner - Contributor III
Partner - Contributor III
Author

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
MVP
MVP

Yes, they do. It would be better, if you could explain your requirement in more details with a sample qvw.

bertrand_herard
Partner - Contributor III
Partner - Contributor III
Author

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
MVP
MVP

Try this in expression:

=If(ValueList(2010,2014)<=2012, ValueList(2010,2014), -1)

MarcoWedel

=If(ValueList(2010,2014)<=2012, ValueList(2010,2014), ValueList(2010,2014)-1)

MarcoWedel

or

=ValueList(2010,2014)+(ValueList(2010,2014)>2012)

tresesco
MVP
MVP

Did he mean that?. Hope he understood how it works and modified according to his requirement.

bertrand_herard
Partner - Contributor III
Partner - Contributor III
Author

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