Power Bi Notes 1749806995
Power Bi Notes 1749806995
Power BI is a Business Intelligence tool developed by Microsoft that helps convert raw
data into meaningful insights through interactive dashboards, visualizations, and
reports.
• It's used for data analysis, data visualization, and report sharing.
• Connects to various data sources (Excel, SQL, web APIs, cloud services)
• Drag-and-drop visualizations
Component Description
Main development tool for creating reports and data models. Installed
Power BI Desktop
locally.
Power BI Report
On-premise report hosting (for organizations that don’t use the cloud).
Server
1. Connect – Import data from Excel, SQL Server, APIs, SharePoint, etc.
2. Transform – Clean and shape the data using Power Query Editor (ETL process).
3. Model – Define relationships, calculated columns, and measures using DAX.
4. Visualize – Create interactive charts, tables, and KPIs.
5. Publish & Share – Upload reports to Power BI Service and share via dashboards or
apps.
Power BI vs Excel (Key Differences)
Data Volume Handles millions of rows efficiently Struggles with large data
Data Modelling Star schema, relationships, DAX Flat tables, basic formulas
Power BI Desktop is a free application that runs on Windows and allows you to connect
to data, transform it, model it, and create visual reports.
• Download from Microsoft’s official website or install via the Microsoft Store.
Ribbon (Top) Access to common features like data import, visuals, and modeling tools.
3. Connecting to Data
• Excel
• CSV/Text
• SQL Server
• Web APIs
• SharePoint
• Azure
Interview Tip: Be ready to explain how you connect to SQL Server or Excel and what
credentials or steps are involved.
Mode Description
Import Data is imported and stored in Power BI file (fastest, best for modelling).
DirectQuery Data stays in source; queries run live every time you view a report.
Live Connection Used for SSAS (SQL Server Analysis Services) only.
• Use the Publish button to upload your report to Power BI Service for sharing and
dashboard creation.
4. Can we change from DirectQuery to Import? (Yes, but only in some cases)
Power Query Editor in Power BI is used for cleaning, transforming, and shaping data
before it's loaded into the model.
Power Query is a data connection and transformation tool used in Power BI Desktop. It
follows ETL (Extract, Transform, Load) principles.
You can open Power Query by clicking “Transform Data” in the Home tab.
Section Purpose
Data Preview
Shows current view of the data table.
Pane
Applied Steps
Keeps track of every transformation step (in order).
Pane
Section Purpose
These are the most commonly used transformations in interviews and real projects:
Transformation Description
Change Data Type Convert text, whole number, decimal, date, etc.
These are crucial for combining data from multiple sources or tables.
• Merge Queries (similar to SQL JOIN): Combine rows from two tables using a key
column.
• Append Queries (like SQL UNION): Stack data vertically from two tables with similar
columns.
Interview Tip: Be ready to explain a use case for Merge (e.g., combining Customer data with
Sales data).
arduino
CopyEdit
• You’re not expected to write M from scratch in most interviews, but understanding the
syntax helps.
• Each action in Power Query adds an "Applied Step", which is executed in order.
• Query Folding: When transformations are pushed back to the source (important for
performance in DirectQuery).
• Click Close & Apply to load cleaned data into Power BI Desktop.
4. Can you explain how you used Group By or Unpivot in your projects?
Data modeling is the process of structuring your data tables, defining relationships, and
preparing calculated fields so your visualizations and measures work correctly.
3. Relationships
Power BI automatically detects relationships, but you should understand how to manage them.
Term Meaning
Cross Filter Direction Single or both (usually keep Single for performance and clarity).
Interview Tip: Explain that you often work with one-to-many relationships (e.g., one
customer can have many orders).
Schema Description
Best Practice: Use Star Schema for better performance and simpler DAX.
Calculated
Each row in a table Aggregated over multiple rows
For
Storage Stored in the model (uses memory) Calculated on the fly (efficient)
Create new data fields (e.g., Profit = Sales - KPIs like Total Sales, Avg
Use Case
Cost) Discount
7. Role-playing Dimensions
Sometimes the same dimension table is related to a fact table multiple times (e.g., Date as
Order Date and Ship Date). Use inactive relationships and USERELATIONSHIP() in DAX.
DAX is the formula language used in Power BI for creating measures, calculated columns, and
calculated tables. It allows you to perform custom aggregations, calculations, filters, and time
intelligence analysis.
Aggregation:
DAX
CopyEdit
SUM(Sales[Amount])
AVERAGE(Orders[Quantity])
MAX(Products[Price])
Logical:
DAX
CopyEdit
SWITCH(TRUE(), ...)
Text:
DAX
CopyEdit
LEFT(Product[Code], 3)
Date:
DAX
CopyEdit
YEAR(Orders[OrderDate])
MONTH(Orders[OrderDate])
3. Filter Functions
DAX
CopyEdit
REMOVEFILTERS(Date)
CALCULATE() is the most powerful function in DAX — it modifies the filter context.
Power BI has built-in support for time-based calculations (if you have a proper date table).
DAX
CopyEdit
TOTALYTD(SUM(Sales[Amount]), 'Date'[Date])
SAMEPERIODLASTYEAR('Date'[Date])
• Your model has a relationship between the Date Table and your fact table
Context Description
CALCULATE transitions from row context to filter context — important for advanced DAX
questions.
Total Sales
DAX
CopyEdit
DAX
CopyEdit
YoY Growth
DAX
CopyEdit
Data visualization in Power BI is about transforming raw data into visuals that help users
understand, explore, and make decisions effectively.
This is where you build your pages, add charts, and organize your visuals using:
Interview Tip: Be prepared to explain why you chose a specific visual for a metric.
• Make sure every chart has a clear title and axis labels
You can also control visual interactions using "Edit Interactions" under the Format tab.
6. Custom Visuals
2. What are drill-down and drill-through? How have you used them?
3. What are slicers and how do you use them for interactivity?
Once your report is built in Power BI Desktop, you need to publish it, share it, and manage its
access, refresh, and usage using the Power BI Service (cloud platform).
• Creating dashboards
3. Dashboards vs Reports
Data Source Single dataset Can pin tiles from multiple reports
Dashboards are used to monitor KPIs at a glance; reports are for deeper analysis.
4. Sharing Options
Method Notes
Share report Directly with users via email (Pro license required)
Publish to Web Generates public link ( Not secure for confidential data)
Power BI Apps Package multiple reports into an app for easy distribution
Make sure you manage Row-Level Security (RLS) if users should only see their own data.
Interview Tip: RLS is often asked in scenarios — like restricting sales reps to see only their
region’s data.
Premium Higher capacity, paginated reports, advanced AI, and RLS at scale