Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to have a text box on the side showing which field values are currently selected and represented by the data in various charts. I have several filters for selecting various fields.
1. I want to build a text string of the fields selected. I would like at least 3 different fields to be listed, with the values of that field listed, in the text box (Country, Product and Year) as to build a sentence. I have succeeded in listing one field, but cannot get the two others to work in the same textbox. This is not a nested IF since I need the ELSE to be an option for all three IFs. Hence, I need to list 3 IF expressions that can all provide a list (if field is selected).
=If(GetSelectedCount([.Country])=0, 'All countries', GetFieldSelections([Country],', '))
2. The year is based on a date field Year([Date]) and I cannot make it work at all in the GetFieldSelections() function. Like the filter I only want the year and not the full date.
Any help is much appreciated!
I believe all you have to do is to concat these expression using &.
So I would make like:
='Country: ' & If(GetSelectedCount([.Country])=0, 'All countries', GetFieldSelections([Country],', '))&chr(10)&
'Year: '&year(Date)
The "chr(10)" skips to a new line. The year(Date) will bring you the year of the selected date (or you can also create a column in the script with Year(Date) as Year.)
Is this what you are looking for?
I believe all you have to do is to concat these expression using &.
So I would make like:
='Country: ' & If(GetSelectedCount([.Country])=0, 'All countries', GetFieldSelections([Country],', '))&chr(10)&
'Year: '&year(Date)
The "chr(10)" skips to a new line. The year(Date) will bring you the year of the selected date (or you can also create a column in the script with Year(Date) as Year.)
Is this what you are looking for?
This solved it! Great - Thanks!
HELLO,
i have a problem
Hi Prithika,
You can create some IF there and use with the GetFieldSelection formula.
Take a look here: