Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Aggr Function with GetFieldSelection and Set Expression into Script Variable

Hi all,

I have an issue with the creation of a variable in the script part, however it seems to be problematic, hope somebody can have a quick look

This is my data

  t1

IdDimVal
id1a5
id1b7
id1c19
id2a8
id2b10
id2c15

Another field called "DimSelect" used in the set analysis later and refered to by the GetFieldSelections expression is created by ->

Nav:

Load Distinct

     Dim as DimSelect

Resident t1;

Now, creating chart function works fine:

=aggr(max( {<Dim={'$(=GetfFeldSelections(DimSelect))'}>} Val), Id)

However, I would like to have this chart function as a variable created in the script, and unfortunately it does not work

Script:

let vAggr = 'aggr(max( { <Dim = {"$(=GetFieldSelections(DimSelect))" }> }  Val), Id)';

Chart:

=$(vAggr)

Does anyone possibly know what I am doing wrong? The issue seems to be with the expression GetfieldSelections(DimSelect), because inserting a value like "b" instead of GetFieldSelections expression also works fine.

Thanks!

11 Replies
Anonymous
Not applicable
Author

Hello Marcus, thanks for the link, I will have a look

Anonymous
Not applicable
Author

Hi Kiran, thanks for the link. I wanted to use the definition of it so that I can refer to it in the front end. I didn't want to use the script in any sort, as it depends on a front end action.