Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello I have two tables. The first is a list of transactions which represent customers changing their product service from one thing to another. The order ID is unique in this table.
Order ID | original product id | new product id | change date |
1 | 123 | 875 | 02/11/2022 |
2 | 561 | 123 | 04/09/2022 |
3 | 454 | 561 | 10/10/2022 |
The second table is a list of all products that the customer has and the date that each product service started. In this table the order id is not unique.
Order ID | customer id | product id | start date |
1 | A | 123 | 02/09/2021 |
1 | A | 699 | 06/06/2021 |
1 | A | 747 | 10/04/2021 |
2 | B | 561 | 01/01/2022 |
3 | C | 123 | 06/07/2020 |
3 | C | 454 | 05/08/2021 |
I would like to create a new column in the first table which has the date that the original plan was created like so:
Order ID | original product id | new product id | change date | original product start date |
1 | 123 | 875 | 02/11/2022 | 02/09/2021 |
2 | 561 | 123 | 04/09/2022 | 01/01/2022 |
3 | 454 | 561 | 10/10/2022 | 05/08/2021 |
I have tried using CALCULATE with RELATEDTABLE and FILTER, kind of like this:
But this results in a 'Circular dependency detection error'.
I have also tried the LOOKUPVALUE function like so:
But this results in the multiple values being returned : "A table of multiple values was supplied where a single value was expected."
Any help would be much appreciated.
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
Original product start date CC =
MAXX (
FILTER (
RELATEDTABLE ( Table2 ),
Table2[product id] = Table1[original product id]
),
Table2[start date]
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Schedule a short Teams meeting to discuss your question
This did the trick. Thanks for your help!
Hi,
Please check the below picture and the attached pbix file.
Original product start date CC =
MAXX (
FILTER (
RELATEDTABLE ( Table2 ),
Table2[product id] = Table1[original product id]
),
Table2[start date]
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Schedule a short Teams meeting to discuss your question
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
10 | |
10 | |
9 | |
9 |
User | Count |
---|---|
20 | |
13 | |
13 | |
11 | |
8 |