Forum Discussion
VinitGohil1976
1 year agoFrequent Visitor
Comparing Dates between two different tables
I am trying to create a new custom measure that will compare two dates from two different tables. This is how the model has been defined I need to compare the Agreement[Agreement Activated ...
- 1 year ago
You could create a calculated column in the agreement snapshot fact table like
Cancellation Due Date = MAX ( RELATED ( Agreement[AgreementActivatedDate] ), RELATED ( Policy[Policy Date] ) ) + 60
Deku
1 year agoSuper User
Max( max( Agreement[Agreement Activated Date]), max(Policy[Policy Date]))
- VinitGohil19761 year agoFrequent Visitor
That also causes the same issue. I am basically trying to define this Sql logic in Power Bi
date_add(IF(pol.PolicyStartDate > agr.AgreementActivatedDate, pol.PolicyStartDate, agr.AgreementActivatedDate), 60) as CancellationDueDateI tried with IF clauses and SWITCH statements also but i think the issue is more with the model than it is with the dates. If there are any further suggestions, i am willing to try any... thanks