Forum Discussion
Variable Date Measure - Insurance
- 9 years ago
Hi PowerPaddy,
According to your description above, you should be able to use the formula below to create a new measure to calculate the Total Earnings for each date in the date table, and show it with the Date column of DateTable on Chart on the report in your scenario. :smileyhappy:
Measure For Total Earnings = VAR currentDate = MAX ( DateTable[Date] ) RETURN SUMX ( policyFact, IF ( currentDate >= [StartDate], [Prem] * DIVIDE ( ( DATEDIFF ( [StartDate], currentDate, DAY ) + 1 ), ( DATEDIFF ( [StartDate], currentDate, DAY ) + 1 ) ) ) )Regards
- 9 years ago
Hi PowerPaddy,
Great to hear the problem got resolved! Could you accept my reply above as solution to close this thread? :smileyhappy:
Regards
Hi PowerPaddy,
According to your description above, you should be able to use the formula below to create a new measure to calculate the Total Earnings for each date in the date table, and show it with the Date column of DateTable on Chart on the report in your scenario. :smileyhappy:
Measure For Total Earnings =
VAR currentDate =
MAX ( DateTable[Date] )
RETURN
SUMX (
policyFact,
IF (
currentDate >= [StartDate],
[Prem]
* DIVIDE (
( DATEDIFF ( [StartDate], currentDate, DAY ) + 1 ),
( DATEDIFF ( [StartDate], currentDate, DAY ) + 1 )
)
)
)
Regards
Thanks very much, worked a treat!
Looks pretty obvious once you know how.
- v-ljerr-msft9 years agoMicrosoft Employee
Hi PowerPaddy,
Great to hear the problem got resolved! Could you accept my reply above as solution to close this thread? :smileyhappy:
Regards