4 Replies Latest reply: Jul 27, 2016 9:10 PM by Eric Tsoi

# How to use ValueLoop in Set Analysis

Hi

I would like to ask for some advice on how to use ValueLoop in Set Analysis. I have a synthetic dimension using ValueLoop and I want to use the values of this ValueLoop dynamically in the set analysis expression so as to get following result :

 ValueLoop(0.1,1,0.1) ?? -------------------- ----------------------------------------------- 0.1 Count({=0.1"}, Category={'Good'}>} id) 0.2 Count({=0.2"}, Category={'Good'}>} id) 0.3 Count({=0.3"}, Category={'Good'}>} id) 0.4 Count({=0.4"}, Category={'Good'}>} id) 0.5 Count({=0.5"}, Category={'Good'}>} id) 0.6 Count({=0.6"}, Category={'Good'}>} id) 0.7 Count({=0.7"}, Category={'Good'}>} id) 0.8 Count({=0.8"}, Category={'Good'}>} id) 0.9 Count({=0.9"}, Category={'Good'}>} id) 1 Count({=1"}, Category={'Good'}>} id)

I tried to use below but it does not work -

Count({<prob={">=\$(=ValueLoop(0.1,1,0.1))"}, Category={'Good'}>} id)

Thanks,

Eric

• ###### Re: How to use ValueLoop in Set Analysis

ValueLoop within Set Analysis might not work. To tell you the truth, I have never tried it, but from the looks of things, I don't think it will work. You will have to use Pick(Match())... to get this done.

• ###### Re: How to use ValueLoop in Set Analysis

Set Analysis sets are evaluated before the graph calculation, not per row.

it would be not possible to create that expression

• ###### Re: How to use ValueLoop in Set Analysis

Reading: A Primer on Set Analysis

Set analysis is a way to define an aggregation scope different from current selection. Think of it as a way to define a conditional aggregation. The condition, however, is in itself like a selection that is evaluated before the cube (the chart) is expanded. Hence, it is not possible to have a condition that is evaluated row by row.

• ###### Re: How to use ValueLoop in Set Analysis

Thanks Sunny & Clever!

I will use other methods to do that.

Regards,

Eric