Power BI Week 2
Power BI Week 2
Week 2
Loading and Transforming Data
Loading and
Transforming Data
Data Profiling (Column Quality)
Data Profiling (Column Distribution)
Data Profiling (Column Profile)
Basic Transformations
Date Specific
Basic Transformations
Each business has different entities. Entities have different characteristics called attributes
Department Employees
Many-to-Many Relationship
OLTP vs OLAP
Normalization and De-normalization
Normalization and de-normalization are two techniques to transform and store data in order to
create a model
Normalization is the process of organizing the columns (attributes) and tables of a database to
reduce data redundancy and improve data integrity
De-normalization is the opposite of normalization, that is increasing data redundancy, with the goal
of improving the understanding of the model
Relationship and cardinality
Relationship and cardinality
Relationship and cardinality
Primary key
Foreign keys
Types of Joins
Left Outer Join Right Outer Join
All from A and Matching from B All from B and Matching from A
Dimension Dimension
Fact
Dimension Dimension
Dimensional Modeling for BI
Dimension 111
Fact Constellation Or Galaxy Schema
What is granularity?
Context can come from a variety of different locations – filters and slicers
You can even change the context within the DAX formula
Calculating simple measures in DAX is very easy as the ‘context’ automatically does most of the
work
Evaluation, Filter and Row Context
• Evaluation context is filter context plus the row context
• Filter context
• This includes everything applied on the canvas + filters coming from the relationship
within the model
• Filter context is the filters coming within the formula + aggregation function
• Filter context is applied automatically and propagates through the available
directions in the relationship
• Row Context
• Row context is simply ‘row-by-row’ computation
• Calculated Columns do calculation using the Row Context
• If a filter context is used inside a calculated column, CALCULATE can change the
filter context to a row context.
• In measures, the row context comes into play through the Iterator Functions
Calculated Columns, Measures and
Calculated Tables
• Calculated Columns
• A column you add to an existing table
• DAX formula gets calculated for each row of the table
• It is calculated immediately and the result gets stored in memory
• It gets recalculated on refresh or when the table gets released from memory (closing and opening of
Power BI)
• Not accessible in Power Query
• Measures
• Needs an aggregator or iterator function to work
• It is not calculated immediately
• It needs context to calculate results
• Same formula gives you different results depending on what filters are applied
• Calculated Tables
• Create new tables in your model using DAX
• Allows you to do calculations on different granularities or filtered tables
• They are recalculated if any of the tables they pull data from are refreshed or get updated
DAX Functions
• Reference a column or a table
• A DAX function will return a value or a table
• Aggregation Functions
• Iteration Functions
• Relational Functions
• Table Functions
• Time Intelligence Functions