cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper II

## Date difference between two different tables columns

Hi PBI Experts,

We have two different tables Tabele1 and Table2 in that table i need find Caluclated Column dax function for  Date diffence between two tables(Joining date and Action date along with filter is Action Type = "Termination"), Here need to find Date difference(Joining date and Action date) and also apply the filter Action Type = "Termination",Could you please suggest  solution.

Thanks,

Shaik.

1 ACCEPTED SOLUTION
Community Support

Hi, @Mahamood0218 ;

Try it.

``Diff = DATEDIFF(RELATED(Table1[Joining date]), [Action date],DAY)``

The final show:

Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 REPLIES 2
Community Support

Hi, @Mahamood0218 ;

Try it.

``Diff = DATEDIFF(RELATED(Table1[Joining date]), [Action date],DAY)``

The final show:

Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Super User

Do both tables have the same Unique Key on [Emp Id]? If so, you can join them via a relationship and specify one-to-one cardinality. From there, you can use a DAX function of RELATED ( ) to get to a value in another table.

My Date Diff in Table 1 = DATEDIFF( ....RELATED('Table 2'[Action Date])...) (sorry, I don't recall exact syntax of the functions.

 Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - June 2024

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

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors