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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
byturki
Regular Visitor

Get number of order days from two tables with the last action

Hi gays,

I have Table1(Main_order) with columns ("OrderID" & "create_order_date") this table has all orders &
I have Table2(Task_followup) with column ("OrderID" & "Taking_Action_date") this table has a lot of steps for each order to track the action for each "OrderID" from table1.

The relation between table1 & table 2 is "OrderID"
For Example:

OrderID= 1563, create_order_date = 3-3-2022 from Table1 (Main_Order) => OrderID= 1563 Table2 ( Task_FollowUp),      

                                                                                                                          FollowId1(Taking_Action_date) = 5-3-2022

                                                                                                                           FollowId2(Taking_Action_date) =7-3-2022

                                                                                                                           FollowId3(Taking_Action_date) =9-3-2022

I want to calculate count of order days taking from create_order_date from table1, to the last (Taking_Action_date) from table2

output is: 6 Days

                                                                                                

Now, I want to calculate count of order days for all orders taking from "create_order_date" from table1, to the last (Taking_Action_date) from table2, and if null replace with today date.


Thanks

1 REPLY 1
wdx223_Daniel
Super User
Super User

Measure=MAX(Table2[Taking_Action_date])-MAX(Table1[create_order_date])

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors