Forum Discussion
Anonymous
4 years agoNot applicable
Full outer join using calculated columns
Hello Folks, AFAIK, we cannot Join tables using calculated columns. But, I am now in a tricky situation that, I have TableA and TableB. TableA has calculated columns( NOT custom columns.). ...
- Anonymous4 years ago
Hi Anonymous ,
You could get the result by creating a measure.
Measure = var _value = CALCULATE(SUM(TableA[ApprovedSpend]),FILTER(ALLSELECTED(TableA),TableA[PostingYear]=SELECTEDVALUE(TableA[PostingYear])&&TableA[GroupID]=SELECTEDVALUE(TableB[GroupID]))) return _value+0Best Regards,
Jay
amitchandak
Super User
4 years agoAnonymous , rename the column of Table 2 or use selectcolumns in next code to change name. I am assuming rename appending 1
Addcolumns(
crossjoin(Table1, Table2) , "New Spend", if( [GroupID] = [GroupID 1], [Spend], 0) )
Crossjoin does not take the same column name
https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/
- Anonymous4 years agoNot applicable
Thanks for the help!