Professional Documents
Culture Documents
Power Bi Notes
Power Bi Notes
_________________________________________________________________________
UNIT 1: Get Started with Power Bi
Business analyst:
Data analyst
Data engineer
Data scientist
Database administrator
Tasks of Analyst:
Prepare
Model
Visualize
Analyze
Manage
Power Bi Desktop
Power BI Service
Power BI Apps
A common flow of work in Power BI begins in Power BI Desktop, where a report is created. That report
is then published to the Power BI service and finally shared, so that users of Power BI Mobile apps can
consume the information.
to change the location of a source file for a data source during development, or if a file storage location changes.
Edit in Power Query
1. Data source settings
2. Query settings
3. Advanced Editor
Get Data >> Select your data source (SQL server) >> add DB details>> select connect mode >> sign in using any method.
Connect Modes:
Sign IN options:
Windows :- Windows account(Azure Active Directory)
Database :- Database username and pwd
Microsoft:- Microsoft Credentials
Storage Modes: Can be changed in model view by selecting data table and edit from Properties.
Import
The Import mode allows you to create a local Power BI copy of your datasets from your data source. You can use all
Power BI service features with this storage mode, including Q&A and Quick Insights. Data refreshes can be scheduled
or on-demand. Import mode is the default for creating new Power BI reports.
Direct
The DirectQuery option is useful when you don't want to save local copies of your data because your data won't be
cached. Instead, you can query the specific tables that you'll need by using native Power BI queries, and the required
data will be retrieved from the underlying data source.
Dual
In Dual mode, you can identify some data to be directly imported and other data that must be queried. Any table
that is brought in to your report is a product of both Import and DirectQuery modes. Using the Dual mode allows
Power BI to choose the most efficient form of data retrieval.
Note: Similar to a relational database, you can choose the tables that you want to use. If you want to directly query the Azure Analysis
Services model, you can use DAX or MDX.
Query Folding : Power Query Editor >> Query Settings >> last step in applied steps >> Right click >> Native Query
The query folding within Power Query Editor helps you increase the performance of your Power BI reports. Query
folding is the process by which the transformations and edits that you make in Power Query Editor are
simultaneously tracked as native queries, or simple Select SQL statements, while you're actively making
transformations. The reason for implementing this process is to ensure that these transformations can take place in
the original data source server and don't overwhelm Power BI computing resources.
Note By default, Power Query examines the first 1000 rows of your data set. To change this, select the profiling status in the status bar
and select Column profiling based on entire data set.
__________________________________________________________________________________________
UNIT 3: Model Data in Power Bi
A good data model offers the following benefits:
Data exploration is faster.
Aggregations are simpler to build.
Reports are more accurate.
Writing reports takes less time.
Reports are easier to maintain in the future.
Star Schema one fact table and multiple standalone dimension table all of them connected to fact table.
Result:
Level 1 = PATHITEM(Employee[Path],1)
Level 2 = PATHITEM(Employee[Path],2)
Level 3 = PATHITEM(Employee[Path],3)
Result:
4. Data Granularity increasing or decreasing the level of details. (Aggregating the data reduces Granularity and vice versa)
5. Cardinality is the measure of unique values in a table.
An analytic query has three phases that are implemented in the following order:
1. Filter
2. Group
3. Summarize
Filtering, or slicing, targets the data of relevance. In Power BI reports, filters can be applied to three different scopes: the entire report, a
specific page, or a specific visual. Filtering is also applied in the background when row-level security (RLS) is enforced. Each report visual
can inherit filters or have filters directly applied to it.
Summarizing produces a single value result. Typically, numeric columns are summarized by using summarization methods (sum, count, and
many others). These methods are simple summarizations. More complex summarizations, like a percent of grand total, can be achieved by
defining measures that are written in DAX.
By using Data Analysis Expressions (DAX), you can add three types of calculations to your data model:
Calculated tables
Calculated columns
Measures Implicit(sigma sign), Explicit(calculator sign)
explicit measures are model calculations that are written in DAX and are commonly referred to as simply measures. Yet, the concept
of implicit measures exists, too. Implicit measures are columns that can be summarized by visuals in simplistic ways, like count, sum,
minimum, maximum, and so on. You can identify implicit measures in the Fields pane because they're shown with the sigma symbol ( ∑).
Dax Variables:
You can declare DAX variables in your formula expressions. When you declare at least one variable, a RETURN clause is used to define the
expression, which then refers to the variables.
We recommend that you use variables because they offer several benefits:
Improving the readability and maintenance of your formulas.
Improving performance because variables are evaluated once and only when or if they're needed.
Allowing (at design time) straightforward testing of a complex formula by returning the variable of interest.
Note:
Iterator functions iterate over tables and evaluate an expression for each table row.
The CALCULATETABLE DAX function performs exactly the same functionality as the CALCULATE function, except that it modifies
the filter context that's applied to an expression that returns a table object.
_________________________________________________________________________
UNIT 4: Visualize data in Power Bi
_________________________________________________________________________
UNIT 5: Data Analysis
_________________________________________________________________________
UNIT 6: Manage Workspace & datasets