Forum Discussion

PeteyG's avatar
PeteyG
Icon for Helper I rankHelper I
2 years ago
Solved

Duplicating a Table based on an Activities Moving Date.

Hello-

 I need to make a duplicate of the table below based on the Activity ID and Forecast Finish.  ACT-Con-016 is the end of 60% Design.  The issue is the Forecast dates can change with weekly data upates.  Is there a way to duplicate the table below based on the Forecast Field where Activity ID is ACT-Con-016 and before what ever it has in its Forecast Finish>?

 

If not possible is there a way I can duplicate table and keep any Activity where Forecast Finish is before 11/1/2024?

 

Duplicate this table:

Activity IDActual FinishForecast  FinishBL Finish 
ACT-Con-001  3/13/20223/13/20223/8/202260% Complete
ACT-Con-0023/14/20223/14/20223/11/2022
ACT-Con-0037/15/20227/15/20227/14/2022
ACT-Con-00411/15/202211/15/202211/16/2022
ACT-Con-00511/14/202211/1/202211/19/2022
ACT-Con-0061/19/20231/17/20231/22/2023
ACT-Con-0073/15/20233/20/20233/27/2023
ACT-Con-0085/18/20235/21/20235/30/2023
ACT-Con-0095/22/20235/22/20238/2/2023
ACT-Con-0109/28/20239/22/202310/5/2023
ACT-Con-01111/23/202311/23/202312/8/2023
ACT-Con-0121/24/20241/24/20242/10/2024
ACT-Con-0133/29/20243/26/20244/14/2024
ACT-Con-0146/1/20245/27/20246/17/2024
ACT-Con-015 7/28/20248/20/2024
ACT-Con-016 9/28/202410/23/2024
ACT-Con-017 11/29/202412/26/2024 
ACT-Con-018 1/30/20252/28/2025 
ACT-Con-019 4/2/20255/3/2025 
ACT-Con-020 6/3/20257/6/2025 

 

To this table:

Activity IDActual FinishForecast  FinishBL Finish 
ACT-Con-0013/13/20223/13/20223/8/202260% Complete
ACT-Con-0023/14/20223/14/20223/11/2022
ACT-Con-0037/15/20227/15/20227/14/2022
ACT-Con-004 11/15/202211/15/202211/16/2022
ACT-Con-00511/14/202211/1/202211/19/2022
ACT-Con-0061/19/20231/17/20231/22/2023
ACT-Con-0073/15/20233/20/20233/27/2023
ACT-Con-0085/18/20235/21/20235/30/2023
ACT-Con-0095/22/20235/22/20238/2/2023
ACT-Con-0109/28/20239/22/202310/5/2023
ACT-Con-01111/23/202311/23/202312/8/2023
ACT-Con-0121/24/20241/24/20242/10/2024
ACT-Con-0133/29/20243/26/20244/14/2024
ACT-Con-0146/1/20245/27/20246/17/2024
ACT-Con-015 7/28/20248/20/2024
ACT-Con-016 9/28/202410/23/2024
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi PeteyG 

     

    You can first duplicate the query, 

    In the new query, filter rows by [Activity ID] column and select Equals... and set it to equal to ACT-Con-016. This will give you the formula like below in the formula bar and remain only one row in the outcome. 

    = Table.SelectRows(#"Changed Type", each [Activity ID] = "ACT-Con-016")

    Don't worry, you just need to change the equal sign "=" into "<=", then you will have the expected outcome like below. 

     

    Reference: Filter by values in a column feature description - Power Query | Microsoft Learn

     

    Best Regards,
    Jing
    If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi PeteyG 

     

    You can first duplicate the query, 

    In the new query, filter rows by [Activity ID] column and select Equals... and set it to equal to ACT-Con-016. This will give you the formula like below in the formula bar and remain only one row in the outcome. 

    = Table.SelectRows(#"Changed Type", each [Activity ID] = "ACT-Con-016")

    Don't worry, you just need to change the equal sign "=" into "<=", then you will have the expected outcome like below. 

     

    Reference: Filter by values in a column feature description - Power Query | Microsoft Learn

     

    Best Regards,
    Jing
    If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!