PWC Power Bi
PWC Power Bi
Key Components:
Result: These components together enable end-to-end data analysis and business
intelligence solutions.
Comparison Table
Familiar, formula-
Ease of Use User-friendly, drag-and-drop Steep learning curve
based
Data Handles large datasets Great for big data Struggles with large
Handling efficiently visualization datasets
Result:
Report View
Data View
Model View
Example: If you have Sales and Customer tables, Model View helps link them using
CustomerID.
Result: These views together allow users to clean data, create relationships, and
build reports efficiently.
Key Differences
Used for report creation and data Used for sharing and
Function
modeling collaboration
Result:
• Use Power BI Service for publishing and sharing reports with teams.
Example: If you need to analyze customer data from an SQL Server database, Power BI
allows direct database connections, query execution, and data transformation.
1️ .Connect to Data Sources – Import data from databases, files, APIs, or cloud services.
2️ .Apply Transformations – Clean, filter, merge, split, pivot, and format data.
3 .Create Data Models – Establish relationships between datasets.
4️ .Load Data into Power BI – After transformation, data is loaded into Power BI for
reporting.
Example: If a dataset contains missing values, Power Query allows you to replace
nulls with default values before loading into Power BI.
Result: Power Query makes data preparation simple, repeatable, and automated,
saving manual effort in cleaning and transforming data.
Example: If a dataset has date columns in MM/DD/YYYY format but requires YYYY-MM-
DD, Power Query can change the format automatically.
Example: If you have sales data from 2015 to 2025, you can configure Power BI to store
data from the last 5 years and refresh only the last 1 month.
Data Modelling
9. What is a Star Schema, and Why is It Important in Power BI?
A Star Schema is a data modeling approach used in Power BI and data warehousing where
a central fact table is linked to multiple dimension tables.
Result: Star schema is the preferred design in Power BI because it improves report
speed, performance, and data organization.
One-to-Many (1:M) – The most common relationship (e.g., one customer has multiple
orders).
Many-to-Many (M:M) – Used when both tables contain non-unique values.
One-to-One (1:1) – Each record in one table has only one corresponding record in
another.
Importance of Relationships:
Example: A Sales table can be related to Customers (via CustomerID) and Products
(via ProductID) to get meaningful insights.
Example:
Calculated Column: Total Price = Sales[Quantity] * Sales[Unit Price] (Row-wise).
Measure: Total Sales = SUM(Sales[Total Price]) (Aggregates on demand).
Result: Measures are preferred over calculated columns because they are faster and
memory-efficient.
Example: If a Sales Manager should only see data for their region:
[Region] = USERPRINCIPALNAME()
This ensures users only view data related to their assigned region.
Result: RLS enhances security, maintains data privacy, and prevents unauthorized
access in Power BI.
DAX
13. What is DAX, and How Does It Work in Power BI?
DAX (Data Analysis Expressions) is a formula language in Power BI, used to perform
calculations and aggregations on data models. It is similar to Excel formulas but optimized
for data modeling, relationships, and performance.
Example:
Result: DAX enables customized calculations and enhances data analysis in Power
BI.
Example:
Total Revenue = SUMX(Sales, Sales[Quantity] * Sales[Unit Price])
This computes total revenue dynamically by multiplying each row’s quantity with the
unit price.
Result:
SUM() works on a column, SUMX() iterates row-wise, and CALCULATE() modifies
filtering behavior.
1️ .Create a table with different metric names (e.g., "Sales", "Profit", "Orders").
2️ .Use a slicer to let users select a metric.
3 .Write a DAX SWITCH() function to return the selected metric.
Selected Measure =
SWITCH(
SELECTEDVALUE(MeasureTable[Metric]),
"Sales", SUM(Sales[Amount]),
"Profit", SUM(Sales[Profit]),
"Orders", COUNT(Sales[OrderID])
Now, selecting “Sales” will show total sales, while selecting “Profit” will display profit.
Result: This enables interactive dashboards where users can choose different KPIs
dynamically.
Ignores all filters applied ALL(Sales) removes all filters from Sales
ALL()
to a table or column table
This returns total sales for all data, ignoring filters applied in reports.
Result:
ALL() removes all filters.
ALLEXCEPT() removes all filters except specific columns.
REMOVEFILTERS() selectively removes filters from a column or table.
1️ .Import Data – Connect to a data source using Power Query and clean the data.
2️ .Create Relationships – Ensure correct relationships between tables in Model View.
3 .Build Visuals – Use bar charts, pie charts, KPIs, cards, and tables for insights.
4️ .Add Interactivity – Use slicers, filters, and cross-highlighting for dynamic exploration.
5 .Enable Drill-through and Drill-down – Allow users to go deeper into data.
6 .Use Bookmarks and Buttons – Save states for storytelling and easy navigation.
7️ .Optimize Performance – Reduce unnecessary visuals, enable query reduction in
slicers, and use aggregations for faster loading.
8️ .Publish and Share – Upload the report to Power BI Service and share it with
stakeholders.
Example:
• Sales Dashboard with slicers for Year, Region, and Product Category.
Result: Users can click, filter, and drill-down into the data for deeper insights.
18. What Are Custom Visuals in Power BI, and How Do You Use
Them?
Custom visuals are additional Power BI visuals beyond the built-in options, used for
advanced reporting needs.
Example:
1️ .Create a hierarchy in Model View (e.g., Year > Quarter > Month > Day).
2️ .Add the hierarchy to a bar chart or line chart.
3 .Enable the drill-down button (downward arrow in the chart).
4️ .Click on data points to navigate deeper into details.
Example:
• A Sales Trend Chart where clicking on "2️02️4️" breaks down into quarters → months.
Example:
Result: Users can interactively explore data at different levels, improving insights and
usability.
Example:
Performance Optimization
• Optimize the data model by using Fact & Dimension tables instead of a single large
table.
Types of Aggregations:
1️ .Implicit Aggregation:
2️ .Explicit Aggregation:
Example:
2️ .Implement Aggregations
• Store summary tables (e.g., Monthly Sales) instead of raw transactional data.
Example:
• Instead of loading 50M sales records, aggregate data to "Sales by Region &
Month" for efficient analysis.
Result: Power BI handles billions of rows efficiently, ensuring faster dashboards and
reports.
• Use date filters to limit data (e.g., load only last 2️ years of sales).
• Avoid heavy visuals like maps and tables with too many rows.
• A report showing global sales loads slowly → Apply a Region filter to show only one
continent at a time.
Result: Reports load faster, use fewer resources, and improve user experience.