Forum Discussion
kala2
4 years agoHelper III
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:
**When a year changes, the dates will increment by year:
Is it possible to achieve something like that?
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)
3 Replies
- ryan_mayuSuper User
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)