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
Anonymous
Not applicable

Left join with condition to related table

Hi all

 

Im currently replacing a report which was built with a SQL query.

I got everything to work (many wheres and conditions) expect one thing:

1.PNG

This is the relation tab in the report:

2.PNG

 

Either i need to set a condition while joining, or creating a column in Orderlines to compare the From/Till dates to the ones in SlotAssignments.

 

I tried using a measure wiht using MAX(), but this didnt work. DAX' Related function is also not possible as its not the correct relation.

 

Any ideas?

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Found another way to achieve my goal.

I joined the tables inside "Edit querys" and setup my rules there.

Not as nice as a DAX solution but it works.

View solution in original post

3 REPLIES 3
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please create a bridge table using Union function between bookings and sloa, Then related tables based on the bridge table.
 
bridge = union(values(bookings[column]),values(Slot[column]))
Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

HI @v-frfei-msft 

 

I didnt get this to work. If i union these two tables, via column "Slots_ID", i just get all the slot_Id's.

What i really need is the From and Till column from table Sloa PER orderlines_ID (in table bookings or directly in table orderlines).

 

Is this also possible?

Anonymous
Not applicable

Found another way to achieve my goal.

I joined the tables inside "Edit querys" and setup my rules there.

Not as nice as a DAX solution but it works.

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.