Forum Discussion
timazarj
5 years agoHelper II
Customer Loyalty
Hi, In my model, I need to calculate customer loyalty. for example, Adam bought a service from us on 15 July 2016, recorded as service effective date and 15 July 2017 as service expiry date, and ev...
- 5 years ago
Hi timazarj ,
Try the following formula:
Measure = CALCULATE( DATEDIFF( MIN('Table'[effective date]), MAX('Table'[expiry date]), MONTH ) / 12, ALLEXCEPT('Table','Table'[customer]) )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-kkf-msft
5 years agoCommunity Support
Hi timazarj ,
Try the following formula:
Measure =
CALCULATE(
DATEDIFF(
MIN('Table'[effective date]),
MAX('Table'[expiry date]),
MONTH
) / 12,
ALLEXCEPT('Table','Table'[customer])
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- timazarj5 years agoHelper II
Thank you! very helpful