Using a Calculated Table to Populate the Rows in a Matrix
The calculated table is related to the Financial Summary table via the FinancialSummaryLineTypeId column. The Destination Category column is added to the rows in a Matrix to summarize the measures
Sales Detail Destination Categories =
UNION(
CALCULATETABLE(
SELECTCOLUMNS(
'Financial Summary Line Type',
"FinancialSummaryLineTypeId", 'Financial Summary Line Type'[FinancialSummaryLineTypeId],
"Destination Category", 'Financial Summary Line Type'[Destination Category]
),
'Financial Summary Line Type'[Destination Category] IN { "Carry Out", "Delivery", "Dine In", "Drive Thru" }
),
CALCULATETABLE(
SELECTCOLUMNS(
'Financial Summary Line Type',
"FinancialSummaryLineTypeId", 'Financial Summary Line Type'[FinancialSummaryLineTypeId],
"Destination Category", "Delivery"
),
'Financial Summary Line Type'[FinancialSummaryLineTypeId] = 191
)
)
Comments
Post a Comment