Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all
I am struggling to get a variable in set analysis to return the correct amount
count({<[*Lineout Type]={'$(vLineout_FCV_Win)'}>} [*Lineout Type])
where
vLineout_FCV_Win = FirstSortedValue(DISTINCT [*Lineout Type],-aggr(count({<[*Result]={'Win'}>}[*Lineout Type])+rank([*Lineout Type],[*Lineout Type])/10,[*Lineout Type]))
Thanks
I usually put my expression in a straight table with no column header. The expression will become the header and you will Gorky get an indication on what's wrong.
Have you tried the following expression?
count({<[*Lineout Type]={"$(=vLineout_FCV_Win)"}>} [*Lineout Type])
Starts the variable vLineout_FCV_Win with an equal sign? Does this variable return the expected value?
Quite helpful to see how an expression is evaluated is to use a table-chart for it and don't using a name for them and then viewing the evaluation within the expression-label.
- Marcus
Hi there,
Yes, I have tried the expression and get the return of zero
No, I get the error ''Error in set modifier ad hoc element list: ',' or ')' expected''
For the variable itself or for the expression with variable? Especially in such cases is it useful to look within the label how the expression will be evaluated and I would further split the approach into several steps by splitting the count- and aggr- and rank-functions to ensure they return the right results.
- Marcus
For the expression with variable.
The variable itself is returning the correct amount
Starts the variable vLineout_FCV_Win with an equal sign?
- Marcus
Hi,
1. Create variable,
vLineout_FCV_Win
[*Lineout Type]=FirstSortedValue(DISTINCT [*Lineout Type],-aggr(count({<[*Result]={'Win'}>}[*Lineout Type])+rank([*Lineout Type],[*Lineout Type])/10,[*Lineout Type]))
2. count({<$(vLineout_FCV_Win)>} [*Lineout Type])
Hi,
If your variable declaration is in Script, try with LET Statement instead of SET. Sometimes this will solve the issue.