Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hy,
Would like to filter in my table some TYPE, but according to a filter :
If FR is selected select only MAG= 'Rennes'
If RU is selected select only MAG='Moscow', null())
I tried like this but doesn't work :
=IF(GetFieldSelections(COUNTRY) = 'FR',[MAG]='Rennes',
IF(GetFieldSelections(COUNTRY) = 'RU',[MAG]='Moscow', null() ) )
Thanks again !
What object are you trying to do this in? Is this going to be used as a filter or do you need this in an expression of a chart?
In a table, want to show only specific lines ! according to the country
And this is based on selections or you always want to see these values?
Like this, have only one table object and I want to modify the expression in Mag field but don't have the good syntax I guess. Or there is a better way to do it ?
Thanks
Try this
=If(GetFieldSelections(COUNTRY) = 'FR',
Sum({<[MAG] = {'Rennes'}>} Sales),
If(GetFieldSelections(COUNTRY) = 'RU',
Sum({<[MAG] = {'Moscow'}>} Sales), Null()))
thanks I dont' need to aggr sales just to show the line
but I will try,
Oh, you don't need to Sum() it you mean?
yes that's what I mean
You can do Only() or Avg() in that case
=If(GetFieldSelections(COUNTRY) = 'FR',
Only({<[MAG] = {'Rennes'}>} Sales),
If(GetFieldSelections(COUNTRY) = 'RU',
Only({<[MAG] = {'Moscow'}>} Sales), Null()))
or
=If(GetFieldSelections(COUNTRY) = 'FR',
Avg({<[MAG] = {'Rennes'}>} Sales),
If(GetFieldSelections(COUNTRY) = 'RU',
Avg({<[MAG] = {'Moscow'}>} Sales), Null()))