Forum Discussion
Artefact
Helper II
2 years agoCombine 3 tables in DAX
I have to combine a colum from 3 separate tables into one table with all combinations : So this must be the end result So it must only be the combinations which are present in the data, NOT ALL pos...
Lorenzo994
2 years agoNew Member
Ok, now I get what you want. You want a Full Outer Join.
Unfortunately, DAX does not support this kind of join operation as far as I'm aware, so if you can't push this operation to Power Query (which indeed supports Full Outer Joins Full outer join - Power Query | Microsoft Learn) then the only solution that comes to my mind is a not so elegant workaround, which is the following:
- Do a NATURALLEFTOUTERJOIN between Table1 and Table2, let's call it Join1
- Do a NATURALLEFTOUTERJOIN between Table2 and Table1 (the order is important), let's call it Join2
- Do first an UNION and then a DISTINCT between Join1 and Join2, let's call the resull FinalJoin
- Repeat this process between FinalJoin and Table3
Let me know if it works for you.
Artefact
Helper II
2 years agoThanks Lorenzo, seems like your idea works, but I need the full code for your solutions. I don't understand were I put the UNION and DISTINCT functions. Seems like these functions don't work with 2 (distinct) or 3 (union) columns in my code.