Forum Discussion

DAST's avatar
DAST
Frequent Visitor
1 year ago
Solved

Earliest date from two fact tables as new query/parameter for date table

I need two new queries or parameter to compare and find the earliest and latest dates in the date columns of two fact tables. These two dates are then passed to the date table as its start and end po...
  • BA_Pete's avatar
    1 year ago

    Hi DAST ,

     

    In Power Query, I think your parameter code should look something like this:

    // Start Date
    List.Min(
        {
            List.Min(Query1[DateColumn]),
            List.Min(Query2[DateColumn])
        }
    )
    // End Date
    List.Max(
        {
            List.Max(Query1[DateColumn]),
            List.Max(Query2[DateColumn])
        }
    )

     

     

    Pete