Forum Discussion

Anonmous_user's avatar
Anonmous_user
New Member
3 years ago

Date Difference on having condition on Dates.

Hi,

I am trying to display number of days between two dates :
I have two date columns(Joining_Date, Resigned_Date) in EMPtable and have created Independent Dimdate table and created slicer for Dimdate .
Now i want to get datediff between [Joining_Date] and Dimdate from 'date slicer' having condition on Resigned_Date.

Below is the table Having  Columns empid, joing_date, Resigned_date,

here Dimdate[date] is the selected date from filter.

I want to create measure DateDifference to calculate number of days between  'joining date' and 'dimdate' for empids whose 'Resigned_Date is greater than Dimdate or Resigned not present'.

EMPIIDJoining_DateResigned_DateDimdate (selected date from slicer)DateDifference
123402-09-202008-06-202120-02-2023 
321425-02-202131-03-202121-02-2023 
123104-03-202131-03-202122-02-2023 
533427-03-202117-04-202123-02-2023 
446406-04-2021 24-02-2023685
111206-04-2021 25-02-2023685
745606-04-2021 26-02-2023685



can someone please help me to get this done

No RepliesBe the first to reply