Forum Discussion
Return columns from multiple tables
- Anonymous7 years ago
Thanks for the suggestions - looking at them lead me down another path and I found the best solution (for me at least) is to create a series of measures to extract the sub-type for each row -
Sub Type MST1 =CALCULATE (VALUES ('REC_TYPE1'[ST1] ) ,FILTER ('MASTER TABLE' ,'MASTER TABLE'[Rec ID] = SELECTEDVALUE ( 'MASTER TABLE'[Rec ID] )))then MST2, MST3, MST4.And then use another measure to concatenate the individual type measures -Sub-Type =CONCATENATE ('MASTER TABLE'[MST1] ,CONCATENATE ('MASTER TABLE'[MST2] ,CONCATENATE ('MASTER TABLE'[MST3] ,'MASTER TABLE'[MST4])))
Hello,
I think you have the solution in this post:
Best Regards,
JO
Hi Anonymous
You may use below formula to create the table:
Table = UNION(TableA,TableB,TableD)
Regards,
- Anonymous7 years agoNot applicable
unfortunately the detail tables are not the same layout - the different types have different numbers of columns, and not all of them have a sub-type. Also I have no access to the query editor.
- v-cherch-msft7 years agoMicrosoft Employee
Hi Anonymous
You may follow the workaround in the post which mentioned by jooliveira to create the table:New Table= UNION(SELECTCOLUMNS...)
Regards.
- Anonymous7 years agoNot applicable
Thanks for the suggestions - looking at them lead me down another path and I found the best solution (for me at least) is to create a series of measures to extract the sub-type for each row -
Sub Type MST1 =CALCULATE (VALUES ('REC_TYPE1'[ST1] ) ,FILTER ('MASTER TABLE' ,'MASTER TABLE'[Rec ID] = SELECTEDVALUE ( 'MASTER TABLE'[Rec ID] )))then MST2, MST3, MST4.And then use another measure to concatenate the individual type measures -Sub-Type =CONCATENATE ('MASTER TABLE'[MST1] ,CONCATENATE ('MASTER TABLE'[MST2] ,CONCATENATE ('MASTER TABLE'[MST3] ,'MASTER TABLE'[MST4])))