Forum Discussion

speedramps's avatar
speedramps
Icon for Super User rankSuper User
6 years ago
Solved

Power BI calendar batch date

I want to pass a ETL batch date from my data warehouse to my Power BI calendar. I know how to hard code a Power BI calendar, but how can I replace the hardcoded CurrentDate = #date(2020, 1, 1) with...
  • hnguy71's avatar
    6 years ago

    speedramps ,

    I would create a new blank query and call it something like: param_CurrentDate
    From there you can have in your code something like this:

    let
        // Substitute Table[Date] to your query table you'd like to retrieve from and the column in which holds the current date
        CurrentDate = List.Max(Table[Date])
    in
        CurrentDate


    And, finally, you can call param_CurrentDate from your calendar query.