Forum Discussion
Anithalakshmi
8 years agoFrequent Visitor
Break months between dates as Columns
The data I have is EmpID Name Project Start Date End Date Effort% 1 Name1 P1 01-02-2018 29-05-2018 100 2 Name5 P2 01-01-2018 01-04-2018 60 3 Name2 P3 01-04-2018 ...
- 8 years ago
Not sure if you want to do this in M or DAX. In DAX you can create calculated columns with the following formula:
Jan = VAR MyMonth = 1
RETURN IF(MONTH([Start Date])<=MyMonth && MONTH([End Date])>=MyMonth,[Effort%],BLANK())Just change the column name and the MyMonth value for each column.
Greg_Deckler
8 years agoCommunity Champion
Not sure if you want to do this in M or DAX. In DAX you can create calculated columns with the following formula:
Jan = VAR MyMonth = 1
RETURN IF(MONTH([Start Date])<=MyMonth && MONTH([End Date])>=MyMonth,[Effort%],BLANK())
Just change the column name and the MyMonth value for each column.
Anithalakshmi
8 years agoFrequent Visitor
my startdate is in Dec 2017 and enddate is in Mar2018
The date comparision fails for dec where the month is 12.Should I use datediff function? Not sure how