Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
Hi,
I need to calculate the difference between dates from two different tables. The tricky part is that both date columns (marked with red lines) are kept in tables connected as in the picture below:
purple, blue and green lines represent different sets of key used to connect all of the tables together.
I already tried datediff(data1, related(date2),day) method, but it says that tables need to be connected. As you can see, they are but not directly.
May I ask for your assistance on this?
@Danielnir Maybe:
Measure =
VAR __Date1 = MAX('SOPOrderReturn'[RequestedDeliverDate])
VAR __Date2 = MAX('SOPInvoiceCredit'[DocumentDate]
RETURN
( __Date1 - __Date2 ) * 1.
Should I mention that I have something around 23k dates to compare? That's just comparing the highest date from one to the highest date from the second. My bad, I wasn't precise enough. Also tried changing MAX to SELECTEDVALUE but it resulted in a blank column...
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 62 | |
| 60 | |
| 48 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 119 | |
| 116 | |
| 37 | |
| 34 | |
| 30 |