Snippet de código TSQL para consulta de vendas otimizada
SELECT
'Customer'[Company Name],
'Date'[Date],
'Product'[Color],
SUM ( 'Sales'[Quantity] )
FROM 'Sales'
LEFT OUTER JOIN 'Customer' ON 'Sales'[CustomerKey] = 'Customer'[CustomerKey]
LEFT OUTER JOIN 'Date' ON 'Sales'[OrderDate] = 'Date'[Date]
LEFT OUTER JOIN 'Product' ON 'Sales'[ProductKey] = 'Product'[ProductKey];
Prickly Pheasant