Forum Discussion

Mahamood0218's avatar
Mahamood0218
Helper II
3 years ago

Need to find date difference between two columns

Hi PBI Experts,

 

I have one simple requirment need to findout date differnece between ''Service date'' and ''Term.Date''

But for Emp.No - 19031 i dont have data in "Service Date" Column at that time i need to take data  from ''Valid from'' first column data (ex. - emp no - 19031 ,Valid from - 11-04-2019 and term date - 11-04-2022) 

here i need to find date difference between Valid from and Term.Date) here i need find two condition in single caluclated column dax function could you please suggest.

 

 

1 Reply

  • This "appears" to be an Excel spreadsheet with merged cells.
    Assuming Emp.No "19031" is in merged cell A5 and it's associated TermDate of "11-04-22" is actually a DATE field and is in merged cell E5 and that all records in columns B thru E are DATE fields, in cell F2 the following formula could be entered and then copied down:

        =IF(ISBLANK(E2),"",IF(ISBLANK(D2),E2-C2,E2-D2))