Forum Discussion
Creating a Measure Start date, End date, duration
- 4 years ago
sohaibnomani use the following measure
Measure = SUMX ( SUMMARIZE ( ADDCOLUMNS ( FILTER ( CROSSJOIN ( 'calendar', _fact ), _fact[Start Date] <= 'calendar'[Date] && _fact[End Date] >= 'calendar'[Date] ), "sum", CALCULATE ( SUM ( _dimension[Manpower] ), TREATAS ( { CALCULATE ( MAX ( _fact[Team] ) ) }, _dimension[Team] ) ) ), [Date], [Team], [sum] ), [sum] )
Hi,
Here is one way to do this:
1. Create a new column to your fact table which displays teams manpower:
2. Create following measure:
The results check out with the data.
I hope this helps and if it does consider accepting this as a solution and giving the post a thumbs up!
Following is the result, which is same as before
Applied formula for column
for measure
I have linked date column from calendar table to startdateonly from the Fact table, but when select "startdateonly" in the above visual chart, no data is displayed while with "day" of Calendar table, it works.
- ValtteriN4 years agoCommunity Champion
Do you need the relationship between start date and calendar for some other reason? If not you could disable it. That is likely causing the issue here.