Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
JanBuzek
Frequent Visitor

Common Date filter for Multiple Tables without creating ambiguous relationships?

Hello everyone,

 

I am facing a situation where I have the following tables and structure:

 

orders (ID, OrderDate)

orderitems (ID, order_ID, product, quantity_ordered)

deliveryitems (ID, orderitems_ID, delivery_ID, quantity_delivered)

deliveries (ID, DeliveryDate)

date (Date)

 

I am trying to compare running totals of Orders (quantity_ordered by OrderDate) and Deliveries (quantity_delivered by DeliveryDate).

As I have dates in two different tables, I created a dedicated date table in order to use it for an axis. However, the problem I run to is that I cannot make the relationships between dates in tables 'date' and 'deliveries' since it would create ambiguity.

 

How can I solve this? 

 

Thank you for your help, I feel stuck.

 

Jan

3 REPLIES 3
v-yuta-msft
Community Support
Community Support

Hi JanBuzek,

 

What's the relationship between the two tables and could you share some sample data?

 

Regards,

Jimmy Tao

structure PBI sample.PNG

Hello Jimmy, this is the structure I am working with.
I am not sure what kind of sample data would help. The tables keep the following data:

  • orders: general information about the order (date, customer....)
  • orderitems: individual items for each order (product, price....)
  • delvieryitems: information about delivery of each orderitem - one orderitem can be delivered in multiple deliveries and a different quantity than was ordered can be delivered
  • deliveries: general information about a delviery (date)
  • invoices: general information about the related invoice - yes, this could probably be merged with deliveries since it is a 1-1 relationship

As you can see creating a Date table tied to both orders and invoices leads to an ambiguous relationships which Power BI does not want to let me create.

 

Thank you for your help.

 

Jan

Greg_Deckler
Super User
Super User

You have two options. You could create a second calendar date table to use with Deliveries. Or, you could create an inactive relationship between your date table and Deliveries table and use USERELATIONSHIP.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.