Forum Discussion
Raj123
2 years agoFrequent Visitor
Create new table\Column to add filtered Data
Hi,
I have requirement to filter value based on condition and add it new column on existing table (If possible) or create new table .
I want to filter value for arrivaldate, arrivaltime, deaprturedate, departuretime where status is "in" and add them to new column or into new table, same with status "out".
I have added sample table and output required table.
Any assistance will be helpful.
Thank you in advance.
Sample Table
| ID | LastName | FirstName | ArrivalDate | ArrivalTime | Departuredate | DepartureTime | Status |
| 1 | First1 | Last1 | 18/03/2024 | 21:20 | 18/03/2024 | 16:40 | out |
| 1 | First1 | Last1 | 19/03/2024 | 8:35 | 19/03/2024 | 1:30 | out |
| 1 | First1 | Last1 | 29/03/2024 | 5:15 | 28/03/2024 | 22:55 | in |
| 1 | First1 | Last1 | 29/03/2024 | 18:10 | 29/03/2024 | 7:45 | in |
| 1 | First2 | Last2 | 18/03/2024 | 21:20 | 18/03/2024 | 16:40 | out |
| 1 | First2 | Last2 | 19/03/2024 | 8:35 | 19/03/2024 | 1:30 | out |
| 1 | First2 | Last2 | 29/03/2024 | 5:15 | 28/03/2024 | 22:55 | in |
| 1 | First2 | Last2 | 29/03/2024 | 18:10 | 29/03/2024 | 7:45 | in |
Output Required
| ID | LastName | FirstName | OUT_ArrivalDate | OUT_ArrivalTime | OUT_Departuredate | OUT_DepartureTime | Status | IN_ArrivalDate | IN_ArrivalTime | IN_Departuredate | IN_DepartureTime | Status |
| 1 | First1 | Last1 | 18/03/2024 | 21:20 | 18/03/2024 | 16:40 | out | 29/03/2024 | 5:15 | 28/03/2024 | 22:55 | in |
| 1 | First1 | Last1 | 19/03/2024 | 8:35 | 19/03/2024 | 1:30 | out | 29/03/2024 | 18:10 | 29/03/2024 | 7:45 | in |
| 1 | First2 | Last2 | 18/03/2024 | 21:20 | 18/03/2024 | 16:40 | out | 29/03/2024 | 5:15 | 28/03/2024 | 22:55 | in |
| 1 | First2 | Last2 | 19/03/2024 | 8:35 | 19/03/2024 | 1:30 | out | 29/03/2024 | 18:10 | 29/03/2024 | 7:45 | in |
1 Reply
- lbendlin
Super User
I have requirement to filter value based on condition and add it new column on existing table (If possible) or create new table .neither of this is possible. You cannot create (meaningful) columns or tables from measures or user choices (filters).