Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to include a variable in a Set Analysis expression value list. However, I can't make it work.
The variable is populated by a switch
Variable
vIndicator = if(Switch='Yes','Hardware','')
Set Analysis
sum({$<Type= {'Software',$(vIndicator)}>} Amount)
Basically, I would like to include the Hardware Amount if the switch selected is 'Yes', otherwise, just display the Software Amount.
Of course, I can change my expression as such
if(Switch='Yes',sum({$<Type= {'Software','Hardware'}>} Amount), sum({$<Type= {'Software'}>} Amount))
but would like to see if I can get it to work as originally designed and without the IF logic.
TableA:
LOAD * INLINE [
Product, Type, Amount
ProdA, Hardware,100
ProdB, Hardware,200
ProdA, Software,300
ProdB, Software,400
];
LOAD * INLINE [
Switch
Yes
No];
Hello,
See the attached. I added an " = " to the variable and changed the way you use the set analysis.
Steve
Hello,
See the attached. I added an " = " to the variable and changed the way you use the set analysis.
Steve
It works.. Thanks !