Forum Discussion
Zepox
4 years agoFrequent Visitor
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...
- 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 columnStep 3: Create a measure in Calendar table:
Steps Measure = SUM('Step Table'[Steps])+0Step 4: Create an another measure for Terrain in the same Calendar tableTerrain = IF(ISBLANK(MAX('Step Table'[Terrain])),BLANK(),MAX('Step Table'[Terrain]))Step 5: Final Output
Tahreem24
4 years agoSuper User
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
- Zepox4 years agoFrequent Visitor
Thank you for your reply, this works as intended and translates to my actual data very well.
I still have some issues trying to make calculations based on the generated data, but I will figure those out along the way. Thanks again!