Forum Discussion
Anonymous
7 years agoNot applicable
Return columns from multiple tables
Hi, I have the following scenario - 1 master summary table with multiple rows, each row includes a type. Multiple detail tables (1 per type), some containing a sub type, and some not. 1 ...
- 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])))
v-cherch-msft
7 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.
Anonymous
7 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]
)
)
)
- v-cherch-msft7 years agoMicrosoft Employee
Hi Anonymous
Glad to hear the reply is helpful, please accept the reply as solution, that way, other community members will easily find the solution when they get same issue.
Regards,