Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Transform a static calendar table imported from Excel into a dynamic one

I have recently imported a data model with all tables and measures from Excel to Power BI, which worked very well.   In Excel, in order to generate my date table, I had manually created a regular E...
  • Migasuke's avatar
    Migasuke
    3 years ago

    Anonymous,
    Okay here is what you can do:

    1. Prepare your fact table with Dates, something like I have in my example:

    2. Retrieve Min and Max (Start and End dates) in numeric format:


    3. Create a table (Calendar), where you have Start Date and End Date in two columns:

    4. Create new column with all dates between those two dates:
    5. Clean the table a bit with removing extra tables:


    I can't attach file here, but in case you want - send me PM and I can send you there.