I have a DAX Query that evaluates into my expected data in both Power BI Desktop and the online service. I am trying to use that same DEFINE/Evaluate DAX query in order to populate a table for my Semantic Model...But presently the only way I see to being able to use this data is by copying the result of the query manually. Is there a way to tie in my DAX Query into my data model cohesively?
As of this writing I know that there is limited scope of support for Dax Query beyond data processing/evaluation...But my interest here is that DAX allows me to pull my semantic model data into a result.
The code specifically I am using is
VAR _tables =
SELECTCOLUMNS(
FILTER(
INFO.TABLES(),
// Exclude hidden tables
[IsHidden] = FALSE()
),
"TableID",[ID],
"TableName",[Name]
)
VAR _columns =
FILTER(
INFO.COLUMNS(),
// Exclude RowNumber columns
[Type] <> 3
)
VAR _result =
SELECTCOLUMNS(
NATURALINNERJOIN(
_columns,
_tables
),
"Table",[TableName],
"Column",[ExplicitName],
"Description",[Description],
"Column in Data Source",[SourceColumn],
"Data Category", [DataCategory],
"Column Type",
SWITCH(
[Type],
1,"Data column",
2, "Calculated column",
[Type]
),
"DAX formula", [Expression]
)
EVALUATE
_result
