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:

Table Sales
Sale IDDateDelivery DateAmount
V0011/15/20241/22/2024250,000
V0023/8/20243/15/2024150,000
V0035/20/20245/31/2024100,000
V0049/12/20249/19/2024100,000
V00511/25/20241/6/2025150,000
V0061/10/20251/24/2025200,000
V0072/18/20252/25/2025150,000
V0083/27/20254/4/2025150,000
V0095/6/20255/16/2025150,000
V0107/14/20257/28/2025150,000
V0119/30/202510/9/2025100,000
V01212/2/202512/15/202550,000
Table: Sales (12 rows)

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.

Tip

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.