Forum Discussion

likhithar's avatar
likhithar
Helper III
4 years ago
Solved

Create Date Table based on Max and Min Order Date from the fact Table

Hello All,    I have a fact table called Sales. There is a column Order Date in Sales Table. I want to create a Date Table in Power Query based on Min Order Date and Max Order Date from the Fact Ta...
  • mahoneypat's avatar
    mahoneypat
    4 years ago

    On you fact table query, select your time period column and on the Transform tab choose Add Suffix under Format dropdown. Add the suffix of 01 and then convert that column to a Date type.  After that, you can reference that column in the List.Min and List.Max steps of that query to get a Date table that dynamically expands as you add more data. If needed, you can wrap the List.Max with Date.EndOfMonth to get the end of the final month.

     

    Pat