Use Dynamic filter values in the calculated field

My customer wants the ability to select the stations from the drop down list and based on that selection the qualification is displayed.
Foe example- If User selected ‘A’, ‘B’, ‘C’ from the Qualification ‘XYZ’ Eligible Stations (drop down filter) then only for those stations XYZ Qualification column should show value else ‘NA’.
Similary If User selected ‘A’, ‘B’, ‘C’ from the Qualification ‘123’ Eligible Stations (drop down filter) then only for those stations 123 Qualification column should show value else ‘NA’.

something like this : if station in (drop down filter values) then XYZ else ‘NA’

Hi @misrsona
Are you talking about

BR

Hi Erik, I want to show the data like below :
employee id, , Station, XYZ Qualififcation, 123 Qualification
e1 s1 yes yes
e2 s2 NA yes
e3 s3 Na NA
based on the below condition:
if station in (s1) then XYZ Qualififcation = ‘Yes’
if station in (s1,s2) then 123 Qualififcation = ‘Yes’

However, instead of hardcoding static value in calculated filed, i want to pass the dynamic value in calculated. User will select which station is eligible for XYZ Qualififcation , in this case user will select ‘s1’ from the filter list.
User will select which station is eligible for 123 Qualififcation , in this case user will select ‘s1,s2’ from the filter list.

I am trying this calculated field which works if I select few stations but does not work if i select all from the drop down filter :ifelse(in(building, ${ABCEligibleStations}) , {ABC_qualified}, ‘NA’)

Hello @misrsona !

From my understanding of the question I believe you need to add more logic to this function for it to work. For example:

ifelse(
${ABCEligibleStations} = 'A' OR
${ABCEligibleStations} = 'B' OR
${ABCEligibleStations} = 'C',
{ABC_qualified}, 
NULL
)

You may have to play with the AND/OR logic. The idea here is that you are telling quicksight that you want to see any row with a specific attribute like ${ABCEligibleStations} and if that is true, to show those rows where {ABC_qualified} has values or is true.

Please let me know if this helps! If it did, please feel free to mark it as a solution to help the community.

Hello @misrsona !

Were you able to try the suggestion I posted above, and if it worked could you mark the post as a solution to help the community?

Hi duncan@, my usecase was changed so did not have to apply this. Thanks for help!

1 Like