3. CPBIG
About Speaker
Hariharan
Lead Consultant, Your SQL Man (I) Pvt Ltd
Solution Expert in MSBI
Microsoft SQL Server, Azure & BI
SAP HANA & Business Objects
Speaker in DPS2017,DDD & CSSUG
Blog
http://dataap.org/author/hariharanr/
Twitter
@imhariharanr
Linked In
hariharan-r-12635640
Email
hari@yoursqlman.com
Group Leader
8. CPBIG
Purpose of DAX
Calculated Columns
• Value is computed for each row
• Materialized in tables as a static column – It consumes memory
• It can be used for slicers and filters
• All rows contain same formula.
Calculated Measures
• Numeric calculation
• Not Materialized
• Dynamic – Does not consume memory
• Evaluated for each row based on the given context.
9. CPBIG
Navigation Functions
RELATED
• Follows the relationships and returns the
value of a column
• Single value as a result
RELATEDTABLE
• Follows relationships and returns all the rows
in relationship with the current row value.
10. CPBIG
Logical & Conditional Functions
Testing (Returns True &
False)
• ISBLANK
• ISERROR
• ISLOGICAL
• ISNONTEXT
• ISNUMBER
• ISTEXT
Logical
• AND
• IF
• IFERROR
• NOT
• OR
Example = 5+10+
IF(
ISNUMBER("A")=FALSE,"0","A“
)
11. CPBIG
Conditional Functions - SWITCH
Advantages over IF
• Easier to debug due to simpler code
• Easier to write
Checks for exact matches
• [MONTH]=1
TRUE()
• Allow range matches
1. Sales Amount
-- computed for row by row
-- Memory
-- Product[Price]
The value of the price column
from the product table
for the current row
Different for each row
2. Profit Margin
-- Calculated column
-- Calculated measure
1. Sales Amount
-- computed for row by row
-- Memory
-- Product[Price]
The value of the price column
from the product table
for the current row
Different for each row
2. Profit Margin
-- Calculated column
-- Calculated measure
Calculate essentially allows you to filter or set of filter s to an expression
1. Sales Amount
-- computed for row by row
-- Memory
-- Product[Price]
The value of the price column
from the product table
for the current row
Different for each row
2. Profit Margin
-- Calculated column
-- Calculated measure