degrees-of-freedom
degrees-of-freedom

Reputation: 873

Concatenate Tabular Analysis Service

Suppose I have a data model with SSAS-Tabular Analysis Service. In this data-model I have multiple tables but for ease suppose I have "Table1", "Table2" and "Table3". Each of these tables have a column named "Source.Name" which indeed indicates each of the files read by that table. Q: I want to write a function "EVALUATE" to be used with DAX Studio or with Pyadomd to take all the values of these columns and concatenate in order to have an array/list of "Source.Name"s. How could this be done?

Upvotes: 1

Views: 248

Answers (2)

degrees-of-freedom
degrees-of-freedom

Reputation: 873

Just another solution to use less memory:

UNION(
    DISTINCT(Table1[Source.Name]), 
    DISTINCT(Table2[Source.Name],
    ...
)

Upvotes: 0

davidebacci
davidebacci

Reputation: 30304

EVALUATE

UNION(
    SELECTCOLUMNS(Table1, "a", Table1[Source.Name]),
    SELECTCOLUMNS(Table2, "a", Table2[Source.Name]),
    SELECTCOLUMNS(Table3, "a", Table3[Source.Name])
)

Upvotes: 1

Related Questions