14.1An inactive relationship: USERELATIONSHIP
In your data, a sale often has several dates. Here, each sale keeps the date of its order and the date of its delivery. The calendar, for its part, can follow only one active relationship at a time. Here is how to go through the other one when you need it.
14.1.1Two dates, a single path
Let us add the delivery date of each sale to Sales:
| Sale ID | Date | Delivery Date | Amount |
|---|---|---|---|
| V001 | 1/15/2024 | 1/22/2024 | 250,000 |
| V002 | 3/8/2024 | 3/15/2024 | 150,000 |
| V003 | 5/20/2024 | 5/31/2024 | 100,000 |
| V004 | 9/12/2024 | 9/19/2024 | 100,000 |
| V005 | 11/25/2024 | 1/6/2025 | 150,000 |
| V006 | 1/10/2025 | 1/24/2025 | 200,000 |
| V007 | 2/18/2025 | 2/25/2025 | 150,000 |
| V008 | 3/27/2025 | 4/4/2025 | 150,000 |
| V009 | 5/6/2025 | 5/16/2025 | 150,000 |
| V010 | 7/14/2025 | 7/28/2025 | 150,000 |
| V011 | 9/30/2025 | 10/9/2025 | 100,000 |
| V012 | 12/2/2025 | 12/15/2025 | 50,000 |
This is a reproduction of the Power BI interface for teaching purposes. It differs from the real interface.
V005 is ordered on 11/25/2024 and delivered on 1/6/2025. Between these two dates, it changes year.
You relate Calendar[Date] to both columns of Sales. Power BI accepts the first relationship and makes the second one inactive. In the Model view, it draws it as a dotted line.
Between two tables, Power BI keeps only one active path. With two, a filter on Calendar would not know which date to follow.
The rest of this lesson is part of izyDAX Pro
You have just read the first section. The next 2, their animations, the exercises and the summary are waiting for you with izyDAX Pro, in a single payment.