Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonmous_user
New Member

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

0 REPLIES 0

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

Top Solution Authors
Top Kudoed Authors