Forum Discussion
Time intelligence: Dim Date table and table with start and end date
I'm still not clear about your logic for new contracts and cancelation. For your active contracts, you can write your measure like below:
active contracts =
CALCULATE (
DISTINCTCOUNT ( contracts[Customer] ),
FILTER (
contracts,
contracts[Start Date] <= LASTDATE ( DateTable[Date] )
&& contracts[End Date] >= FIRSTDATE ( DateTable[Date] )
&& contracts[totalprice in Euro] > 0
)
)
Please also refer to article below:
Counting “Active” Rows in a Time Period: Guest Post from Chris Campbell
Regards,
- xale198 years agoFrequent Visitor
Hi v-sihou-msft,
thank you for your answer.
I had a similar solution at active contracts before. It worked until I managed a relationship between DateTable and Start Date.
Do you have any ideas why my time intelligence isn't working?
Do you have any ideas for cancellation and new contracts?
You're right, especially for new contracts there is no real logic at this formula... but the results are well.
UPDATE:
now I removed the relationship again and active contracts is working now, but now I have the wrong results for new contracts.
best regards