Forum Discussion

Zepox's avatar
Zepox
Frequent Visitor
4 years ago
Solved

Fill missing dates with 0's and empty cells

Hello all,   I have a sample table which countains 4 columns; Name, Date, Steps and Terrain. Not every name has data on each date, and I want to fill those missing dates. I want to fill the Steps c...
  • Tahreem24's avatar
    4 years ago

    Zepox Try these steps:

    Step 1: Create a new calendar table using DAX

    Calendar = CALENDAR(MIN('Step Table'[Date]),MAX('Step Table'[Date]))
     
    Step 2: Join date of this calendar table with Step table's date column

     

     Step 3: Create a measure in Calendar table:

    Steps Measure = SUM('Step Table'[Steps])+0
     
    Step 4: Create an another measure for Terrain in the same Calendar table
    Terrain = IF(ISBLANK(MAX('Step Table'[Terrain])),BLANK(),MAX('Step Table'[Terrain]))
     
    Step 5: Final Output