Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to find out each contract delay in months based on "old date" and "new date".
The given example: I need Month Count difference from "First old date" to "Last New Date" by Contract ID's.
Difference from 2020-11-12 to 2021-04-17 in Month Count measure needed.
Contract ID | Contract Edit Date | Old Date | New Date |
1 | 2020-11-01 | 2020-11-12 | 2021-01-10 |
1 | 2021-01-12 | 2021-01-10 | 2021-02-10 |
1 | 2021-02-03 | 2021-02-10 | 2021-03-15 |
1 | 2021-03-24 | 2021-03-15 | 2021-04-17 |
Hi @MuraliPrasath ,
Please create the first two dimensions as below
VOldDate : aggr(min([Old Date]),[Contract ID])
VNewDate : aggr(max([New Date]),[Contract ID])
and then create below measure to get the months between old date and new date
((year((aggr(max([New Date]),[Contract ID])))*12)+month(Date#((aggr(max([New Date]),[Contract ID])))))
- (((year((aggr(min([Old Date]),[Contract ID])))*12)+month((aggr(min([Old Date]),[Contract ID])))))
Hi @MuraliPrasath ,
Please create the first two dimensions as below
VOldDate : aggr(min([Old Date]),[Contract ID])
VNewDate : aggr(max([New Date]),[Contract ID])
and then create below measure to get the months between old date and new date
((year((aggr(max([New Date]),[Contract ID])))*12)+month(Date#((aggr(max([New Date]),[Contract ID])))))
- (((year((aggr(min([Old Date]),[Contract ID])))*12)+month((aggr(min([Old Date]),[Contract ID])))))
Hi, Thanks for quick reply, Will apply this logic and keep you posted.