Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i define a variable as: set vSC = 'GetFieldselections(Field)';
the field variables in Field are type string. The variable works and i can see in QV that its changing value (text object) when making selections in field.
i want to use this variable in set analysis, but the exppression: sum({<val={'$(=SC)'}>} "summa över")
doesent seem to work. i have tried different solutions.
Any suggestions?
Could you give some examples how the returned string from GetFieldSelections() look like? For example, how many values you are selecting, how the values look like etc. You can also try
=sum({<val = Field >} "summa över")
The variable returned is a text string, i would like sum from the set analysis to depend on what values the variable SC has, eg if i make different selections in Field the sum in the set analysis will change with the selection.
len(GetCurrentSelections(''Field'))
rgv rand, how shall i use the expression? in the set analysis? can you explain further?
thanks
Hi rgv rand,
can you explain further? defining the variable as tour suggestion makes it numeric (as seen in text object), but how does it work in the set analysis?
Some examples of your selections in Field and values to match in field val would be helpful. Since you are quoting your returned variable string, multiple selected values in Field would be taken as single value to match to val. Have you tried my suggested expression?
Hi
Try like this ,
keep above code in a variable and use it set analysis
In variable overview
vLen = len(getCurrentSelections('Field'))
and use it in set analysis.
sum($(vLen))
thanks
if you compare with my set analysis expression above, will sum($(vLen)) change the sum of summa över depending of choice of Field? is sum($(vLen)) the total expression?
thanks
i think you want to find the length of string which you selected .Isn't it ?
else
elaborate your requirement
and check the variable in declaration and expression (in question )
set vSC = 'GetFieldselections(Field)';
sum({<val={'$(=SC)'}>} "summa över")
I don't think you used the same variable in expression.