d a x / m d x q u e r y a n a ly s is s e r v ic e s 2 0 1 2
TRANSCRIPT
![Page 2: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/2.jpg)
•
•
o
o
o
o
•
•
•
![Page 3: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/3.jpg)
Analysis Services 2012Tabular Model
In-Memory ModeVertiPaq Storage
QueryStorage
Engine Query
DAX / MDX query
DirectQuery Mode External Data Sources
Query SQL Query
Process = Read Data from External Sources
![Page 4: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/4.jpg)
•
•
•
•
![Page 5: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/5.jpg)
•
o
o
•
o
o
o
![Page 6: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/6.jpg)
DAX VertiPaq Query
![Page 7: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/7.jpg)
![Page 8: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/8.jpg)
![Page 9: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/9.jpg)
•
o
o
•
o
o
o
•
![Page 10: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/10.jpg)
•
o
o
o
•
o
o
o
•
o
![Page 11: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/11.jpg)
![Page 12: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/12.jpg)
•
•
o
o
o
•
![Page 13: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/13.jpg)
•
o
o
![Page 14: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/14.jpg)
EVALUATE
CALCULATETABLE(SUMMARIZE(
'Internet Sales',Geography[State Province Code],"Sales", SUM( 'Internet Sales'[Sales Amount] )
),FILTER(
Customer,Customer[Last Name] = "Anand"
))
![Page 15: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/15.jpg)
SELECT[Customer].[CustomerKey]
FROM [Customer]
WHERE( PFDATAID( [Customer].[LastName] ) = 81 )
![Page 16: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/16.jpg)
SELECT[Geography].[StateProvinceCode]
FROM [Internet Sales]LEFT OUTER JOIN [Customer]
ON [Internet Sales].[CustomerKey] = [Customer].[CustomerKey]LEFT OUTER JOIN [Geography]
ON [Customer].[GeographyKey] = [Geography].[GeographyKey]WHERE
[Customer].[CustomerKey] IN (11096, 11989, 17005, 22513, 28899, 15054, 19626, 20344, 25918, 27141...[74 total values, not all displayed]);
![Page 17: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/17.jpg)
CalculateTableAddColumns
Scan_VertiPaqGroupBy_VertiPaq
Scan_VertiPaqSum_VertiPaq
Scan_VertiPaq'Internet Sales'[Sales Amount]
Filter_VertiPaqScan_VertiPaq'Customer'[Last Name] = Anand
![Page 18: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/18.jpg)
CalculateTableAddColumns
Scan_VertiPaqGroupBy_VertiPaq
Scan_VertiPaqSum_VertiPaq
Scan_VertiPaq[Sales Amount]
Filter_VertiPaqScan_VertiPaq'Customer'[Last Name] = Anand
EVALUATECALCULATETABLE(
SUMMARIZE('Internet Sales',Geography[State Province Code],"Sales", SUM( [Sales Amount] )
),FILTER(
Customer,Customer[Last Name] = "Anand"
))
![Page 19: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/19.jpg)
SELECT[Geography].[StateProvinceCode],SUM([Internet Sales].[SalesAmount])
FROM[Internet Sales]LEFT OUTER JOIN [Customer]
ON [Internet Sales].[CustomerKey]=[Customer].[CustomerKey]LEFT OUTER JOIN [Geography]
ON [Customer].[GeographyKey]=[Geography].[GeographyKey]WHERE
[Customer].[CustomerKey] IN (11096, 11989, ...[74 total values, not all displayed]) VAND
[Geography].[StateProvinceCode] IN ('VIC', 'BC', ...[21 total values, not all displayed]);
![Page 20: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/20.jpg)
SELECT[Geography].[StateProvinceCode]
FROM [Internet Sales]LEFT OUTER JOIN [Customer]
ON [Internet Sales].[CustomerKey] = [Customer].[CustomerKey]LEFT OUTER JOIN [Geography]
ON [Customer].[GeographyKey] = [Geography].[GeographyKey]WHERE
[Customer].[CustomerKey] IN (11096, 11989, 17005, 22513, 28899, 15054, 19626, 20344, 25918, 27141...[74 total values, not all displayed]);
![Page 21: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/21.jpg)
•
o
o
•
•
•
•
•
![Page 22: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/22.jpg)
EVALUATEROW (
"Sum", SUMX(
'Internet Sales', 'Internet Sales'[Sales Amount] / 'Internet Sales'[Order Quantity] )
)
SELECTSUM( [Internet Sales].[SalesAmount] / [Internet Sales].[OrderQuantity] )
FROM [Internet Sales];
![Page 23: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/23.jpg)
EVALUATEROW (
"Sum", SUMX (
'Internet Sales', IF (
'Internet Sales'[Sales Amount] > 0,'Internet Sales'[Sales Amount] / 'Internet Sales'[Order Quantity]
))
)
SELECTSUM(
[CallbackDataID(IF (
'Internet Sales'[Sales Amount] > 0,'Internet Sales'[Sales Amount] / 'Internet Sales'[Order Quantity]]
) )](
PFDATAID( [Internet Sales].[OrderQuantity] ), PFDATAID( [Internet Sales].[SalesAmount] )
))
FROM [Internet Sales];
![Page 24: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/24.jpg)
SalesAmount Quantity
2,500 12
3,500 14
12,500 12
… …
SELECTSUM(
[CallbackDataID(IF (
'Internet Sales'[Sales Amount]] > 0,'Internet Sales'[Sales Amount]] / 'Internet Sales'[Order Quantity]]
) )](
PFDATAID( [Internet Sales].[OrderQuantity] ), PFDATAID( [Internet Sales].[SalesAmount] )
))
FROM [Internet Sales];
VERTIPAQ SCAN
2500, 122500, 12
IF ([Sales Amount] > 0,[Sales Amount] / [Quantity]
)
FORMULA ENGINE
2500 / 122500 / 12208.3
3500, 143500, 143500 / 143500 / 14250
12500, 1212500, 1212,500 / 1212,500 / 121041Aggregation computedinside Vertipaq, no spooling was necessary
![Page 25: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/25.jpg)
•
•
o
o
•
o
o
•
![Page 26: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/26.jpg)
•
o
o
o
•
o
o
o
![Page 27: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/27.jpg)
•
o
o
•
o
o
![Page 28: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/28.jpg)
<Batch xmlns="http://schemas.microsoft.com/analysisservices/2003/engine"><ClearCache>
<Object><DatabaseID>Adventure Works DW Tabular</DatabaseID>
</Object></ClearCache>
</Batch>
![Page 29: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/29.jpg)
[FirstCurrencyAmount] :=
SUMX(DimCurrency,SUMX(
DimDate,CALCULATE(
VALUES( CurrencyRate[AverageRate] )* SUM( FactInternetSales[SalesAmount] )
))
)
![Page 30: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/30.jpg)
[SecondCurrencyAmount] :=
SUMX(CROSSJOIN(
DimCurrency, DimDate
),CALCULATE(
VALUES( CurrencyRate[AverageRate] ) * SUM( FactInternetSales[SalesAmount] )
))
![Page 31: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/31.jpg)
DEFINE MEASURE 'Internet Sales'[Sales] =
CALCULATE( ROUND( SUM( 'Internet Sales'[Sales Amount] ), 0 ) )MEASURE 'Internet Sales'[YTD Sales] =
TOTALYTD( [Sales] , 'Date'[Date] )MEASURE 'Internet Sales'[QTD Sales] =
TOTALQTD( [Sales] , 'Date'[Date] )EVALUATE
FILTER(ADDCOLUMNS(
CROSSJOIN( VALUES( 'Date'[Calendar Year] ),VALUES( 'Date'[Month] ),VALUES( 'Date'[Month Name] )
),"Sales", [Sales],"YTD Sales", [YTD Sales],"QTD Sales", [QTD Sales]
),NOT ISBLANK( [Sales] )
)ORDER BY 'Date'[Calendar Year], 'Date'[Month]
![Page 32: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/32.jpg)
DEFINE MEASURE 'Internet Sales'[Sales] =
CALCULATE( ROUND( SUM( 'Internet Sales'[Sales Amount] ), 0 ) )MEASURE 'Internet Sales'[YTD Sales] =
TOTALYTD( [Sales] , 'Date'[Date] )MEASURE 'Internet Sales'[QTD Sales] =
TOTALQTD( [Sales] , 'Date'[Date] )EVALUATE
ADDCOLUMNS(FILTER(
CROSSJOIN( VALUES( 'Date'[Calendar Year] ),VALUES( 'Date'[Month] ),VALUES( 'Date'[Month Name] )
),NOT ISBLANK( [Sales] )
),"Sales", [Sales],"YTD Sales", [YTD Sales],"QTD Sales", [QTD Sales]
)ORDER BY 'Date'[Calendar Year], 'Date'[Month]
![Page 33: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/33.jpg)
EVALUATEADDCOLUMNS(
DimProduct,"SumOfSales", CALCULATE(
SUM( FactInternetSales[SalesAmount] ),USERELATIONSHIP( DimProduct[ProductKey], FactInternetSales[ProductKey] )
))
EVALUATEADDCOLUMNS (
DimProduct,"SumOfSales", CALCULATE(
SUM( FactInternetSales[SalesAmount] ),FILTER(
FactInternetSales,DimProduct[ProductKey] = CALCULATE( VALUES( FactInternetSales[ProductKey] ) )
))
)
![Page 34: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/34.jpg)
SELECTDimProduct.ProductKey, ...SUM (FactInternetSales.SalesAmount)
FROM FactInternetSalesLEFT OUTER JOIN DimProduct
ON FactInternetSales.ProductKey = DimProduct.ProductKeyWHERE
...
SELECTFactInternetSales.ProductKey,SUM (FactInternetSales.SalesAmount)
FROM FactInternetSalesWHERE
...
![Page 35: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/35.jpg)
•
o
•
•
•
![Page 36: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/36.jpg)
•
o
o
•
o
o
•
o
o
•
o
o
![Page 37: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/37.jpg)
2,705,081
176,000
140230
1,440
9,000
4.058.451.434
![Page 38: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/38.jpg)
•
o
•
o
o
•
o
o
![Page 39: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/39.jpg)
•
o
o
•
o
o
o
•
![Page 40: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/40.jpg)
![Page 41: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/41.jpg)
#SQLBITS
Speaker Title Room
Alex Whittles Data Modeling for Analysis Services Cubes Theatre
Allen White Maintain SQL Server System and Performance with PowerShell Exhibition B
Hugo Kornelis Everything you always wanted to know about MERGE Suite 3
Stephan Stoltze Excel 2013 - Whats new beside PowerPivot and Power View? Suite 1
Christian Bolton Advanced SQL Server 2012 HA and DR Architectures Suite 2
Niko Neugebauer Dynamic MSBI content generation Suite 4
![Page 42: D A X / M D X q u e r y A n a ly s is S e r v ic e s 2 0 1 2](https://reader031.vdocument.in/reader031/viewer/2022012018/616867f4d394e9041f6f6008/html5/thumbnails/42.jpg)