Forum Discussion
DATEDIFF across multiple tables
Anonymous , If you have one fact that has 4 date, all 4 of them should join to one date table. One active, three inactive, That you can join using userelation - https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in-power-bi
https://www.youtube.com/watch?v=e6Y-l_JtCq4
If you want all four to be analyzed on the same month like no of Requisition, no of PO in Jan 2020, then the above will work. But if you need them on different months Like Jan 2020 PO and Feb 2020 Requisition, you need separate date tables. They need to be date table.
Not sure how subject is related to description, for that refer my blog - https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-2-Date-Difference-Across/ba-p/934397#M451
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.
- Anonymous5 years agoNot applicable
amitchandak thanks for your reply, not sure I understand though.
The dates are present in 4 different dimension tables. Those dimension tables are connected to 1 fact table through ID's (PO ID, Requisition ID, Invoice ID and Payment ID).I need a DAX calculation that can check if the date in the dimension table is present. If yes, do a datediff on that date. If no, check the next dimension table date and so on.
- amitchandak5 years ago
Super User
Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.