Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have this trouble:
my variable gets the selected values of a field:
set v_tipologia =GetFieldSelections(Tipo.Selezione,',',20);
for example, a possible return is the following string:
Delta,Disp
I need use it in the following graph expression but not work:
Count({$<Tipologia2={'$(v_tipologia)'}>}[Key ATT])
Any aid?
Thanks so much!
Create Variable on front end like this
v_tipologia =Concat(distinct Chr(39)&Tipo.Selezione&chr(39),',');
Now write the expression
Count({$<Tipologia2={$(v_tipologia)}>}[Key ATT])
Expression will show error but it will work.
u miss single quote?
set v_tipologia ='GetFieldSelections(Tipo.Selezione,',',20)';
I mean the problem is the graph expression no the variable. Yours doesn't work
Hi,
Try this.
Count({<Tipo.Selezione = {$(=GetFieldSelections(Tipo.Selezione))}>}DISTINCT [Key ATT])
Regards,
Kaushik Solanki
Hi,
Try,
Count({<[Tipo.Selezione]={'$(=concat(distinct [Tipo.Selezione],chr(39)&','&chr(39)))'}>}Open)
I have tried both suggests but they count all elements [Key ATT], without considerering the set
Create Variable on front end like this
v_tipologia =Concat(distinct Chr(39)&Tipo.Selezione&chr(39),',');
Now write the expression
Count({$<Tipologia2={$(v_tipologia)}>}[Key ATT])
Expression will show error but it will work.
Perfect! Thanks
try below one
v_tipologia = =chr(39)& Replace(GetFieldSelections(Tipo.Selezione,',',20),',',chr(39)&','&chr(39))&chr(39)
Count({$<Tipologia2={$(v_tipologia)}>}[Key ATT])
This should also work:
LET v_tipologia = Chr(39) & GetFieldSelections(Tipo.Selezione,Chr(39) & ',' & Chr(39), 20) & Chr(39);
and then your count expression needs to be without single quotes:
Count({$<Tipologia2={$(v_tipologia)}>}[Key ATT])