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
hhemphill
Regular Visitor

Left Outer Join Unrelated Tables in Dax

I am trying to accomplish something similar to the sql statement below in Power BI. I have 2 tables that aren't joined in the model and I need to join on an Id column with effective date parameters. Can this be done in DAX?

 

Thanks

PowerBIExample.png

1 ACCEPTED SOLUTION

@hhemphill 

Hi

i changed your model back to the original data you provided

 

please look at this and see if it works for you





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
vanessafvg
Super User
Super User

@hhemphill 

 

What are you wanting to come out with?  can you give an example?

 

do you want to end up a with a table?  a measure?   that will drive different solutions.    Is this an imported model?  are you able to share some sample data with what you expecting to do with the data





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




I am wanting to have a variable under the sales table that has the product status from the product table. It needs to get the product record where the slider end date is between the Product Effective Date & the Product Expiration Date.

 

I do not want to directly join it due to the many to many relationship. I would like to create a Dax variable if possible.

 

In the example below I would expect Product Id 1 to have a status of Z & Product Id 2 to have a status of Z

 

 

The datasets are imported not direct query. Link to PBIX file PBI Example File

@hhemphill 

Hi

i changed your model back to the original data you provided

 

please look at this and see if it works for you





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




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.