From SQL To Dax: @anniexu1990
From SQL To Dax: @anniexu1990
@Anniexu1990
Who I am
• Dan (Annie) Xu
• Business Intelligence Consultant
• MCSA -> MCSE (BI)
• Blog: https://anniexu1990.com
• All social media accounts (including gmail): anniexu1990
BEFORE We BEGIN
Agenda
• Why use DAX
• SQL to DAX – As Querying Language
• Why faster and key techniques
• Query plan and performance tuning
Why use DAX
• The Modeling, and Querying language for SSAS Tabular Models
(PowerBI and Power Pivot - local instance of Analysis Service)
• Excel pivot table, SSMS or SSRS – MDX is the default language against
SSAS models
• More secure and one source of truth - client
• Faster in almost all analytic situations (column store and Vertipaq
compression)
• Another Option to extract and analyze data (replace ETL, customized
measures etc.)
SQL to DAX – As Querying Language
• Select
• Grouping
• Table Joins
• Aggregation
• Filter
• Customized measures
DEMO
Let’s compare the timing
Why faster - Column Store vs. Row Store
http://saphanatutorial.com/column-data-storage-and-row-data-storage-sap-hana/
Why faster - VertiPaq Compression (reduce
memory footprints)
https://www.microsoftpressstore.com/articles/article.aspx?p=2449192&seqNum=3
How to make DAX faster?
Formula Engine vs. Storage Engine
Cache No Yes
utilization
Performance Check physical plan Check xmSQL queries
Tuning (a textual
representation of SE
query)
Performance Tuning for DAX
“The most important factor of DAX formula speed is data distribution”
• Vertipaq Analyzer