Forum Discussion

Romain-Ch's avatar
Romain-Ch
New Member
1 year ago
Solved

Pattern to incrementally amass data with Dataflow Gen2

Hi, I encouter a problem following this tutorial : Pattern to incrementally amass data with Dateflow Gen2 of microsoft learn. It is said : This assumes that orders are added to the source in asce...
  • v-saisrao-msft's avatar
    v-saisrao-msft
    1 year ago

    Hi  Romain-Ch,
    Thank you for reaching out to the Microsoft Fabric Forum Community. 

    Thank you nilendraFabric, for your valuable insights.

    Thank you for providing the detailed context and screenshot. Based on your description and the behavior you're observing in Power Query for Dataflow Gen2, it seems that the "Maximum" option is greyed out because the column you're working with has been drilled down into a list. In Power Query, the Statistics operations like Maximum, Minimum, etc., are only available when working with a table column, not a standalone list. 

    • Recommended Solution: Instead of drilling down into the OrderDate column (which creates a list and disables the "Maximum" option), stay in the table view and use a custom M step to calculate the maximum. In the formula bar, enter: 

                 = List.Max(PreviousStepName[OrderDate]) 

              Replace PreviousStepName with the actual name of your previous step. This approach directly                returns the maximum date from the column and avoids the limitations caused by working with a            list. 

    • If you prefer not to use custom M code, you can calculate the maximum date using the Group By feature. In the table view, select the OrderDate column, then go to Transform > Group By. In the dialog, leave the Group By field empty to apply the operation globally, name the new column MaxOrderDate, choose the operation Max, and set the column to OrderDate. Click OK to return a single-row table containing the maximum date from the column. 

    If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly. 

     

    Thank you.