Forum Discussion

kala2's avatar
kala2
Helper III
4 years ago
Solved

Fill Dates incremental from January until ID changes

My table is in the following format:  I want to add a new column with dates filled by month. When an ID changes i need to restart the date incremental from January like: **W...
  • ryan_mayu's avatar
    4 years ago

    kala2 

    you can try this

    Column = 
    var _count=CALCULATE(COUNTROWS('Table (2)'),FILTER('Table (2)','Table (2)'[Project ID]=EARLIER('Table (2)'[Project ID])&&'Table (2)'[SAMPLE DATA]<=EARLIER('Table (2)'[SAMPLE DATA])))
    return EDATE(date(2021,1,1),_count-1)