Announcements
cancel
Showing results for
Did you mean:
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
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))

)

12 Replies
MVP

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

Dimension: ValueList(1,2)

Expression: ValueList(1,2)

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

MVP

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

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.

MVP

Try this in expression:

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

MVP

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

MVP

or

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

MVP

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

Partner - Contributor III
Author

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