May 25 2023 07:00 PM
I have a client list Showing Client names and ref numbers, plus start and end dates for different programs and also user numbers for individual programs.
I want to get:
I have attached a Fake simplified version of the report with no PQ.
I'm almost 100% that the process involves grouping by overall user ID, and using Clients with no end date in program to work out who is current.
Any assistance appreciated.
May 27 2023 02:42 AM
To achieve the desired results using Power Query (PQ), you can follow these steps:
= if [Placement End] = null or [Placement End] >= DateTime.LocalNow() then "Current" else "Past"
11. Name the custom column "Status."
12. Group the data by the "User" column. Go to the "Home" tab and click on "Group By.
13. In the Group By dialog box, select the "User" column, and click on the "Advanced" button.
14. In the Advanced Group By dialog box, add a new aggregation for the "Program" column. Choose the "All Rows" option from the dropdown menu.
15.Click OK to apply the grouping.
16. Expand the grouped data by clicking on the double arrow icon next to the "Program" column. This will show the expanded rows with the individual programs for each user.
17. Add a new custom column named "Number of Programs" with the following formula:
= Table.RowCount([Program])
19. Filter the data by the "Number of Programs" column to exclude users with only one program.
20. Select the columns you want to include in the final report, such as "User," "Program," "Status," and any other relevant columns.
21. Load the data back into Excel by clicking on "Close & Load" in the Power Query Editor.
This process will provide you with a table that shows the client IDs, specific current programs, and the number of current programs each client is involved in. The steps were created with the help of AI. The file was not opened for personal security reasons.
May 28 2023 05:58 PM
May 28 2023 06:30 PM
May 28 2023 07:51 PM
Jun 06 2023 08:33 PM
Have realised I messed up in my demo sheet. The issue is that the Player Names are repeated for each individual position. So if someone is a PG and an SG, they have 2 lines. I have added some examples of how I was filtering the data, and what I want it to look like.
Jun 06 2023 08:33 PM