Forum Discussion
Calculate values based on difference between 2 Dates
- 5 years ago
Tarun-Bhatia , One way is populate date from one table 2 another , asuume order no or some key is there
new columns
Table 1 Actual Delivery Date = maxx(filter(Table2, Table2[order no] = table1[order no]),Table2[Actual Delivery Date])
Table 3 Actual Delivery Date = maxx(filter(Table2, Table2[order no] = table3[order no]),Table2[Actual Delivery Date])
Table 3 Planned Delivery Date = maxx(filter(Table1, Table1[order no] = table3[order no]),Table2[Planned Delivery Date])
You can take date diff as columns now .
Or refer how to take across table date diff
refer if need
refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8
Tarun-Bhatia , One way is populate date from one table 2 another , asuume order no or some key is there
new columns
Table 1 Actual Delivery Date = maxx(filter(Table2, Table2[order no] = table1[order no]),Table2[Actual Delivery Date])
Table 3 Actual Delivery Date = maxx(filter(Table2, Table2[order no] = table3[order no]),Table2[Actual Delivery Date])
Table 3 Planned Delivery Date = maxx(filter(Table1, Table1[order no] = table3[order no]),Table2[Planned Delivery Date])
You can take date diff as columns now .
Or refer how to take across table date diff
refer if need
refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8
- Tarun-Bhatia5 years agoRegular Visitor
Thanks for quick reply Amit,
Unfortunately Table 1 & Table 2 are just "Date Tables" with Date dimensions of Planned_Delivery_Date(Table 1) & Actual_Delivery_date (Table 2).
In data model, both are linked to "Table 3" which has all the details about Order_Number, Customer, Qty, Sales etc etc!!
Suggestions?
Thanks
- amitchandak5 years agoSuper User
Tarun-Bhatia , share some sample in table format
- Tarun-Bhatia5 years agoRegular Visitor
Hoping below might help? Tables are linked through Date_ID
- Tarun-Bhatia5 years agoRegular Visitor
Forgot to mention
Table:3 has got "Planned_Date_ID" & "Delivered_Date_ID" which is used to link between Planned date in table 1 & Delivery date in table 2.
Maybe we could use that some way
Thanks