I have two tables. The first table I will have a “State” control for the user to select.
Once they have selected any state, I want all the values remaining in another field “Departure”, to be applied as a filter onto my 2nd table which will also exclude the “State” selected in the control.
If that is possible, could all the values remaining in “Departure” be applied as an or filter onto my second table, so all table 1 “Departure” values equal to table 2 “Departure” or “Arrival”.
I know I can do it with single values using parameters and filtering by paramaters, I was just wondering if it can be done with all remaining values?
Any questions or issues and please just ask, many thanks.
Hello @riley.anderson, to help you resolve this, it may be helpful to see an example analysis in Quick Sight Arena so I can try to implement some updates on my end. If not, maybe some screenshots of how these table layouts look.
If you are wanting to implement changes to one visual based on a selection that alters the display of another, the best route will likely be to use the parameter value from the control combined with calculated fields to determine the values returned. Are your departure and arrival fields a date datatype?
Please follow the link above.
Hopefully that link plus my initial question covers what I’m trying to achieve.
Ultimately, once I have filtered Table 1 using the control, I want it to filter either a single table or a number of tables based on the possible permutations. So Table 1 is filtered using the control, then Table 2 is filtered to all of the remaining “departureairportcode” & “scheduleddateofdeparture” joint combination values for the same fields, but also using the values in those fields and filtering “arrivalairportcode” & “scheduleddateofarrival”.
E.g., filter “group_state_name” = ‘Complete’, two of the records (‘ID1011’,'ID1017) have departureairportcode = LGW & MRS respectively and scheduleddateofdeparture = 2023/09/06 & 2023/09/04 respectively. I want Table 2 to then filter exclude the state group of complete, also have either departureairportcode of LGW or MRS with the dates associated with each record.
My permutations eventually would be DepartureAirportCode & ScheduledDateOfDeparture into DepartureAirportCode & ScheduledDateOfDeparture, DepartureAirportCode & ScheduledDateOfDeparture into ArrivalAirportCode & ScheduledDateOfArrival, ArrivalAirportCode & ScheduledDateOfArrival into DepartureAirportCode & ScheduledDateOfDeparture, or ArrivalAirportCode & ScheduledDateOfArrival into ArrivalAirportCode & ScheduledDateOfArrival.
Hope that makes sense, any questions or issues and please just ask, many thanks.
Riley
Hello @riley.anderson, I think we can figure something out for this, the only thing I am really confused on at this point is how you would want to specify specific departureairportcodes for each of the tables. Also, what functionality would you want to happen on the 2nd table if the filter is set to select all?
My initial thought is we can handle the filtering on the 2nd table using calculated fields rather than directly applying the filter. Some things to note, when using multi-value parameters, the only way you can use them in a calculated field is with the in() function and if you want to check for the select all state, you have to check for it like this, in(NULL, ${Parameter}).
Also, I noticed you have a parameter, but you are setting the control directly to a filter. In the Arena View that I edited, I updated the control to be based on the parameter.
Now, if you want to return state groups that do not equal the one or many selected in the filter you can do this:
Here, you could also add a check for specific departure airport codes, or another check for if all values are selected.
Between this and the updates I made in Arena, we should be able to get your desired result. Let me know if you have any remaining questions. Thank you!
Thank you for your response and time on the matter.
Sorry but I am a bit confused on what to do and what you mean by your questions?
If the filter for selecting a state group for the first table is set to select all then ideally I would want the 2nd table to show nothing as it should be excluding all of the state groups selected.
Any questions or issues and please just ask, many thanks.
This should account for displaying No Data if all values are selected or it will display the state group names that do not match the values selected. I’ll mark this as the solution, but let me know if you have any further questions. Thank you!