Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
Has anyone ever used the getfieldselections within a set analysis as a set modifier?
This is how I tried to accomplish it but so far without working result:
attempt 1: within the set analysis
=avg({1<ext_nis_gewest_naam={'Vlaams Gewest'},ext_data_monthyear={$(=getfieldselection(ext_data_monthyear,','))})>}ext_data_waarde_abs)/Axis_Slider
attempt 2: with the getfieldselection in a variable
=avg({1<ext_nis_gewest_naam={'Vlaams Gewest'},ext_data_monthyear={$(#selectionmonthyear})>}ext_data_waarde_abs)/Axis_Slider
Thank you in advance,
Kr,
Kevin
try
=replace(Concat(DISTINCT chr(39)&GetFieldSelections([Field Name])&chr(39),','),',',chr(39)&','&chr(39))
you have wrong brakets in second ver near variable #selectionmonthyear:
{$(#selectionmonthyear})>}
have you tried quotation marks:
{ '$(#selectionmonthyear)' }
The brackets outside the $expansion do the trick as long as I select only one value. once I select multiple he can't cope with the result from the 'getfieldselection'
I also added an 'if' to my getfieldselection to take '*' in case nothing was selected.
Thanks a lot for the quick response!
Regards
I have something like that:
variable: vCurrent
Concat(DISTINCT chr(39)&[Field name]&chr(39),',')
Aggr(only({1<[Field name] -= {$(=$(vCurrentINames))} >} [Field name]),[Field name])
my variable show possible values.
you can try
=Concat(DISTINCT chr(39)&GetFieldSelections([Field name])&chr(39),',')
and then use {$(=$(vCurrent))}
the aim of this variable is to do search string so u can use it in set analysis
try this
=avg({1<ext_nis_gewest_naam={'Vlaams Gewest'},ext_data_monthyear={$(=getfieldselection(ext_data_monthyear,','))})>}ext_data_waarde_abs)/Axis_Slider
replace with :
getfieldselection(ext_data_monthyear,',',8)
or make ur variable like : getfieldselection(ext_data_monthyear,',',8) - depending which expresion you use ofc.
Karolina,
=Concat(DISTINCT chr(39)&GetFieldSelections([Field name])&chr(39),',') puts the brackets on the outside ('dec-2007, dec-2008') whereas the correct format should be 'dec-2007','dec-2008'
Unless I understood it the wrong way,
thank you again for your quick reply!
Kr,
Kevin
Yes,you're right i didnt notice it
Maybe then you can use
variable: vCurrent
Concat(DISTINCT chr(39)&[Field name]&chr(39),',')
and in the place where you want to use it check if selection was made
.
=if(GetSelectedCount([Field name]),
Aggr(only({1<[Field name] = {$(=$(vCurrentI))} >} [Field name]),[Field name]),
Here put epression when no selections are made
)
try
=replace(Concat(DISTINCT chr(39)&GetFieldSelections([Field Name])&chr(39),','),',',chr(39)&','&chr(39))
Bingo!
Thank you very much!
Kevin
Hi Kevin,
I changed expression I use for your requirements but i realized you do not need concat as GetFieldSelections give you Fields separated by comma. That's enough:
=chr(39)&replace(GetFieldSelections([Field Name]),',',chr(39)&','&chr(39))&chr(39)