Professional Documents
Culture Documents
WITH POWER BI
Meet Power BI?
Pre-built Visuals
d Faster Deployment
Power BI Toolset
Power BI Desktop Power BI Service(Pro) Power BI Mobile
Visualization
Report
Data
Relationship
Power Bi Workflow
Data View
Build table
relationship to create
a data model
Relationship
View Design interactive reports
to explore and visualize
data
Report View
Types of Data Connectors
Data Analysis Expressions, Commonly known as DAX, is the formula language that drives Power BI.
With DAX:
• Add calculated columns and measures to the model, using intuitive syntax
• Go beyond the capabilities of traditional” grid-style” formula, with powerful and flexible functions
built specifically to work with relational data models
• Calculated columns generate values for each rows, which are visible within tables in the Data
view
• Calculated column understand row context; they are great for defining properties based on
information in each row but generally useless for aggregation( SUM, Count etc.)
Calculated Columns
• Calculated columns generate values for each rows, which are visible within tables in the Data
view
• Calculated column understand row context; they are great for defining properties based on
information in each row but generally useless for aggregation( SUM, Count etc.)
DAX Operators
TODAY/NOW()
WEEKDAY/ WEEKNUM
StartOfMonth
EndofMONTH
EOMONTH
DATEDIFF
BASIC LOGICAL FUNCTION
IF()
IFERROR()
AND()
OR()
TEXT FUNCTIONS
LEN()
CONCATENATE
LEFT/MID/RIGHT
UPPER/LOWER/PROPER
SUBSTITUTE
Measures
Are DAX formula used to generate new calculated values
PRO TIP : As a rule of thumb use measures(vs. calculated columns) when a single row
can’t give you the answer( i.e. when you need to aggregate)
BASIC MATH & STATS FUNCTIONS
SUM
AVERAGE
MAX
MIN
DIVIDE
BASIC MATH & STATS FUNCTIONS
COUNT()
COUNTA()
DISTINCTCOUNT()
COUNTROWS()
CALCULATE
Evaluate a given expression or formula under a set of defined filters
=CACULATE(Expression,[Filter1],[Filter2],…)
Note: CALCULATE works like just SUMIF or COUNTIF in Excel, except it can evaluate measures based o ANY sort of calculation
(not just a sum, count etc.); it may help to think of it like “CALCULATEIF”
ALL
Returns all rows in a table, or all values in a column, ignoring any filter that have been applied
=ALL(Table or ColumnName,[ColumnName1],[ColumnName2],…)
Note: Instead of adding filter context, ALL removes it. This is often used when you need unfiltered values that won’t reach to
changes in filter context (i.e. % of Total, where the denominator needs to remain fixed)
DATA TABLES vs. LOOKUP TABLES
Models generally contain two types of tables: Data( or “fact”) tables, and lookup(or
“dimension”) tables
• Data tables contain numbers or values, typically at a granular level, with ID or “key”
columns that can be used to create table relationships (order table, Transaction
table etc.)
• Lookup tables provide descriptive, often text-based attributes about each dimension
in a table( Customer , region, Product attributes etc.)
DATA TABLES vs. LOOKUP TABLES
SalesTerritoryKey Region Country Continent
1 Northwest United States North America
OrderNumber CustomerKey TerritoryKey OrderLineItem OrderQuantity Orderdate stockdate 2 Northeast United States North America
SO61285 23791 1 2 2 01-01-2017 13-12-2003 3 Central United States North America
SO61285 23791 1 3 1 01-01-2017 24-09-2003 4 Southwest United States North America
SO61285 23791 1 1 1 01-01-2017 09-04-2003 5 Southeast United States North America
SO61301 16747 1 2 2 01-01-2017 28-09-2003
6 Canada Canada North America
SO61301 16747 1 1 1 01-01-2017 21-10-2003
SO61301 16747 1 3 1 01-01-2017 23-10-2003 7 France France Europe
SO61269 11792 4 1 1 01-01-2017 09-04-2003 8 Germany Germany Europe
SO61269 11792 4 2 1 01-01-2017 21-10-2003 9 Australia Australia Pacific
SO61286 11530 6 2 2 01-01-2017 24-10-2003 10 United Kingdom United Kingdom Europe
SO61286 11530 6 1 2 01-01-2017 27-09-2003
SO61298 18155 10 1 2 01-01-2017 23-10-2003 CustomerKey Full Name BirthDate MaritalStatus Gender EmailAddress AnnualIncome
SO61298 18155 10 3 1 01-01-2017 12-02-2003 11000 Mr. Jon Yang 04-08-1966 M M jon24@adventure-works.com
$90,000
SO61298 18155 10 2 1 01-01-2017 15-12-2003 11001 Mr. Eugene Huang
5/14/1965 S M eugene10@adventure-works.com
$60,000
SO61310 13541 8 2 2 01-01-2017 10-01-2003 11002 Mr. Ruben Torres
08-12-1965 M M ruben35@adventure-works.com
$60,000
11003 Ms. Christy Zhu
2/15/1968 S F christy12@adventure-works.com
$70,000
11004 Mrs. Elizabeth 08-08-1968
Johnson S F elizabeth5@adventure-works.com
$80,000
11005 Mr. Julio Ruiz 08-05-1965 S M julio1@adventure-works.com
$70,000
11007 Mr. Marco Mehta05-09-1964 M M marco14@adventure-works.com
$60,000
11008 Mrs. Robin Verhoff
07-07-1964 S F rob4@adventure-works.com
$60,000
11009 Mr. Shannon Carlson
04-01-1964 S M shannon38@adventure-works.com
$70,000
11010 Ms. Jacquelyn 02-06-1964
Suarez S F jacquelyn20@adventure-works.com
$70,000
Bookmark
• To Record a view to enable quick access in Future
Importing Custom Visuals