Forum Discussion
Keep only Timecard records which contain specific code
- 5 years ago
Thanks for the data.
Here's a Power Query solution (I didn't know if you wanted DAX or M solution)
In Power Query, duplicate the table.
In the table copy, filter the Attendance Code column for 'UX' (using the column header dropdown)
Remove all the columns except 'Timecard ID'. Right-click the Timecard ID and 'Remove Duplicates' (if required).
You now have a table with a single column of the Timecard IDs that have a UX record.
Using Merge Queries, merge this table with the original table using Inner Join on TimeCard ID.
Delete the unwanted column.
You now have a table with 4 rows.
Good luck
Post a small sample of the data (not a picture) and explain/show the end result desired please
I've modified my question to include an example.
- HotChilli5 years agoCommunity Champion
Thanks for the data.
Here's a Power Query solution (I didn't know if you wanted DAX or M solution)
In Power Query, duplicate the table.
In the table copy, filter the Attendance Code column for 'UX' (using the column header dropdown)
Remove all the columns except 'Timecard ID'. Right-click the Timecard ID and 'Remove Duplicates' (if required).
You now have a table with a single column of the Timecard IDs that have a UX record.
Using Merge Queries, merge this table with the original table using Inner Join on TimeCard ID.
Delete the unwanted column.
You now have a table with 4 rows.
Good luck
- mvgust5 years agoHelper III
Thank you! Simple solution which I should have thought of. Appreciate your help.