Power BI
Power BI
■ COURSE DESCRIPTION:
■ This course focuses on utilizing Power BI for data analysis, visualization, and
reporting.
■ It covers essential skills in programming and software development, equipping
learners to create informative dashboards, automate data processing, and make
data-driven decisions.
■ PURPOSE OF THE COURSE:
■ To provide learners with skills in Power BI for effective data visualization, reporting,
and automation.
MIS/data required
■ Email Creation: Create an email ID for students who do not have an active email ID.
■ Folder Creation: Students create a folder and name it as Course_Student Name.
■ Data Collection Form: Trainers prepare a data collection form (Google Form) in advance.
Share the form link or display a QR code on the projector for students to access it.
■ Student Input: Students fill in their details in the form. Include the folder link in the form
as part of the submission.
■ Detail Verification: Ensure that each student provides complete and accurate details.
■ Follow-up for Absentees: Develop a clear process to follow up with absent students (e.g.,
contacting via phone or email).
About software we will be using
■ Course Delivery: The entire course, except for the initial sessions, will be conducted
on Microsoft Power BI Desktop.
■ Accessibility: Power BI Desktop can be accessed using a laptop or desktop.
■ Device Requirements:
– For iOS Devices: iOS 17.0 or later. Apple iPhone 8 Plus onwards
– For Windows Devices: Minimum 4GB RAM. Running on Windows OS 8 or
higher.
■ Ensure sufficient memory is available to store the program and its resources.
■ It can be downloaded either from Microsoft Store or on website:
https://www.microsoft.com/en-us/power-platform/products/power-bi/downloads
Daily Monitoring and Attendance Protocol
(change)
■ Trainer Attendance:
– Maintain attendance records for each 2.5-hour session.
– Ensure the records are signed by both the SPOC and the college Principal.
■ Student Attendance:
– Record attendance for every 2.5-hour session.
– Attendance sheets must be signed by both the SPOC and the college Principal.
■ Classroom Photograph:
– Capture a geo-tagged photograph of the class in progress each day.
– SPOC is responsible for ensuring this requirement is met and permitted on
campus.
■ Portal Attendance:
– All students must be registered on the designated portal for attendance
tracking.
– SPOC must verify that every student is properly registered.
Basic timeline
■ Power BI is a popular data visualization and business intelligence (BI) tool developed
by Microsoft.
■ As businesses continue to focus on data-driven decision-making, there is a growing
demand for professionals skilled in Power BI.
■ Here are several career paths related to Power BI:
Power BI
Developer ■ Roles: Responsible for creating and
maintaining BI solutions. Design and
implement dashboards, reports, and data
models to provide meaningful insights from
business data.
■ Responsibilities: Design and build
interactive reports and dashboards.
Develop and optimize using DAX (Data
Analysis Expressions).Integrate Power BI
with various data sources, including SQL
Server, Excel, and cloud services. Ensure
data accuracy, security, and performance in
reports
Business ■ Roles: Analyze and interpret
Intelligence complex data, providing insights to
help businesses make informed
(BI) Analyst decisions. Work closely with
business stakeholders to
understand data needs.
■ Responsibilities: Analyze business
requirements, define key metrics
for reporting, Create and support
decision-making visualizations,
Perform data cleaning, data
transformation, and aggregation
and Monitor data quality and
ensure the accuracy of reports.
Data Analyst ■ Roles: Focuses on gathering,
processing, and analyzing data
to extract valuable insights. Use
Power BI for data visualization
and reporting.
■ Responsibilities: Build
dashboards and reports that
visualize trends, patterns, and
key business metrics. Present
findings to business leaders
and stakeholders. Assist in
creating automated reporting
solutions using Power BI.
■ Roles: Experts who help
Power BI organizations implement and
Consultant optimize Power BI solutions.
Assess business needs, design
tailored BI solutions and provide
training and support to users.
■ Responsibilities: Analyze client
requirements and design
custom Power BI solutions.
Provide training and support for
Power BI users. Troubleshoot
issues and optimize
performance.
Power BI ■ Roles: Manage the Power BI
environment, ensuring that
Administrator users can access and utilize
Power BI effectively within an
organization.
■ Responsibilities: Manage Power
BI workspaces, datasets, and
reports. Set up and monitor
security roles, permissions, and
access levels. Ensure optimal
performance of dashboards and
reports. Troubleshoot issues
related to data connectivity and
report access.
Data Scientist ■ Roles: Power BI can be
(with Power BI used to present the results
of advanced analyses in
Skills) an understandable, visual
format.
■ Responsibilities: Visualize
results and communicate
insights using Power BI
dashboards. Collaborate
with business teams to
refine strategies based on
data insights.
Career Growth over a Period of Time
■ Power BI Developer (Junior): Entry-level position, focusing on on
integrating simple data sources and creating visualizations.
■ Power BI Developer (Mid-level): Design and build complex data
models and sophisticated reports on client-specific Power BI
solutions.
■ Power BI Consultant (Senior): Lead complex Power BI projects and
help organizations define their BI strategy and best practices.
■ Business Intelligence Director: Manage a portfolio of BI projects and
direct a team of Power BI professionals while setting the direction for
all BI activities within the organization.
■ Freelance/Entrepreneurship: Building a business brand, working on
independent projects, and managing client relationships.
Entrepreneurship Opportunities
■ Power BI Consulting Firm: Help organizations design, deploy, and optimize their Power BI solutions
to extract value from their data.
■ Power BI Training and Education: establish a business that focuses on training individuals or
corporate teams to become proficient in Power BI.
■ Power BI Custom Solution Development: By offering custom Power BI development services, you
can help clients create tailored reports, dashboards, and analytics solutions.
■ Power BI Dashboards as a Service (SaaS): Create and offer pre-configured Power BI dashboards
that businesses can easily implement and use by designing for specific industries or business
functions.
■ Power BI Automation and Data Integration Services: Generate a business that helps organizations
automate data flows into Power BI and integrate it with other platforms, such as CRM systems,
ERPs, or marketing tools.
■ Power BI Templates and Theme Creation: Invent new Power BI templates and themes that can be
sold to businesses or other Power BI users as they prefer customizable, professional-grade
templates for reports, which saves them time and effort.
THANK YOU
End of the session
POWER BI
DAY 2 – WORLD OF DATA ANALYTICS PART-1
INTRO TO
DATA ANALYTICS
By
Ants Skill Varsity
Introduction to Data Analytics – Overview
HOW TO MAKE INFORMED RAW DATA IS THE NEW OIL EXAMPLE – CAN YOU MENTION ONE
DECISIONS? PLACE YOU USED DATA DRIVEN
DECISION MAKING IN EVERYDAY
LIFE?
Data is also crucial in a Organizations that use data to As a result, data analytics is A sneaker manufacturer might look
professional sense. drive business strategies often find important across many industries. at sales data to determine which
that they are more confident, designs to continue and which to
proactive, and financially savvy. retire, or a health care
administrator may look at
inventory data to determine the
medical supplies they should order.
A data analyst will extract raw data, organize it, and then
analyze it, transforming it from incomprehensible numbers
into coherent, intelligible information.
HELP BUSINESSES MAKE DATA- IDENTIFY TRENDS, CUSTOMER IMPROVES EFFICIENCY AND YOU CAN BE A CONSULTANT
DRIVEN DECISIONS BEHAVIOR, AND MARKET OPERATIONAL PROCESS OF FOR AN AIRLINE TICKET
CHANGES DECISION-MAKING. BOOKING APP USING ANALYTICS
DATA ANALYST FOR OPTIMIZING FLIGHT
BI ASSOCIATE/BUSINESS OPERATIONS ANALYST / SCHEDULES AND PRICING
STRATEGIST MANAGER BASED ON DEMAND TRENDS.
FREELANCE/FULL-TIME
CONSULTANT FDA
PROFESSIONAL
Tools used for Data Analytics
Questions for Discussion
• Definition:
• Analytics involves the systematic computational analysis of data to uncover insights,
patterns, and trends.
• Purpose:
• Enhance decision-making processes.
• Predict future outcomes.
• Optimize operations.
• Key Components:
• Data collection
• Data processing
• Data analysis
Features of Analytics
1. Data Integration
1. Combines data from various sources.
2. Example: Integrating customer data from CRM, web analytics, and sales platforms.
2. Real-Time Processing
1. Provides immediate insights.
2. Use case: Fraud detection in financial transactions.
3. Predictive Analytics
1. Uses historical data to forecast future trends.
2. Example: Predicting customer churn.
4. Prescriptive Analytics
1. Recommends actions based on predictions.
2. Example: Suggesting optimal pricing strategies.
5. Visualization Tools
1. Converts complex data into understandable visuals.
2. Example: Dashboards, graphs, and charts.
Introduction to Data Visualization
• Definition:
• The graphical representation of data to communicate information clearly and efficiently.
• Purpose:
• Simplify complex data.
• Highlight key insights.
• Enhance data storytelling.
• Common Formats:
• Bar charts
• Line graphs
• Pie charts
• Heatmaps
• Scatter plots
Key Principles of Data Visualization
1. Clarity:
1. Avoid clutter.
2. Ensure the message is easy to understand.
2. Accuracy:
1. Represent data truthfully.
2. Avoid misleading visuals.
3. Engagement:
1. Use colors, labels, and interactivity to draw interest.
4. Relevance:
1. Tailor visuals to the target audience and context.
5. Consistency:
1. Maintain uniform design elements.
Features of Effective Visualization Tools
1.Customizability:
•Options to adjust colors, scales, and layouts.
2.Interactivity:
•Filters, drill-downs, and dynamic updates.
3.Integration:
•Compatibility with databases and analytics platforms.
4.Scalability:
•Handles large datasets efficiently.
5.Automation:
•Generates reports and visuals automatically.
Real-World Applications of Analytics and
Visualization
■ 1. Healthcare ■ 3. Retail
• Analytics: • Analytics:
• Predicting patient readmissions. • Personalized marketing.
• Optimizing resource allocation. • Inventory optimization.
• Visualization: • Visualization:
• Monitoring patient health metrics. • Sales heatmaps.
• Mapping disease outbreaks. • Customer behavior trends.
■ 2. Finance ■ 4. Transportation
• Analytics: • Analytics:
• Fraud detection. • Route optimization.
• Risk management. • Predictive maintenance.
• Visualization: • Visualization:
• Portfolio performance dashboards. • Traffic flow maps.
• Market trend analysis. • Fleet performance dashboards.
Case Study: Successful Implementation of
Analytics and Visualization
•Industry: E-commerce
•Solution:
•Analytics:
•Identified peak abandonment times and customer pain points.
•Visualization:
•Created user journey heatmaps and dashboards.
•Outcome:
•20% increase in completed purchases within 3 months.
Best Practices for Implementing Analytics
and Visualization
1. Understand Business Goals:
1. Align analytics with organizational objectives.
2. Ensure Data Quality:
1. Use accurate and relevant data.
3. Invest in Training:
1. Educate teams on tools and techniques.
4. Iterate and Improve:
1. Regularly update models and visuals.
5. Leverage Automation:
1. Use tools that streamline repetitive tasks.
Assignment: Understanding and Applying
Analytics and Data Visualization
■ Objective:
■ To deepen your understanding of analytics and data visualization concepts and their
real-world applications.
■ Instructions:
1. Review the Presentation:
1. Go through the slides carefully and make notes on key points.
2. Research:
1. Find one real-world case study where analytics and visualization significantly
impacted decision-making or operations.
2. Write a summary of the case study (200-300 words).
Assignment Continuation …
4. Create a Visualization:
1. Using any data visualization tool (e.g., Excel, Tableau, Power BI), create a simple
visual representation of a dataset. Examples:
1. Sales trends over time.
2. Population growth by region.
3. Website traffic patterns.
2. Include a brief description of your visualization and its insights.
5. Answer Questions:
1. What are the key features of analytics mentioned in the presentation?
2. How does visualization simplify data interpretation?
3. Why is clarity important in data visualization?
6. Submission:
1. Compile your work into a document or presentation format.
2. Submit by [Insert Due Date].
Evaluation Criteria
•Key Takeaways:
•Analytics drives informed decision-making.
•Visualization makes data accessible and actionable.
•Real-world applications demonstrate immense value across industries.
•Call to Action:
•Explore how analytics and visualization can transform your organization.
•Begin with small, scalable projects.
POWER BI
DAY 4 - Power BI Overview
INTRODUCTION TO POWER BI
•Key Benefits:
2.Power BI Service:
•Online service for sharing and collaborating on reports.
•Features: Dashboards, workspaces, sharing options.
3.Power BI Mobile:
•Access dashboards and reports on mobile devices.
•Features: Alerts, interactive reports.
5.Power BI Embedded:
•Embed Power BI reports into custom applications.
•Features: API access, customizable visuals.
Power BI Architecture Overview
• Data Sources:
• Databases, cloud services, Excel files, APIs.
• Data Ingestion:
• ETL (Extract, Transform, Load) using Power Query.
• Data Storage:
• Data stored in-memory or DirectQuery mode.
• Data Modeling:
• Relationships, measures, calculated columns.
• Visualization Layer:
• Interactive dashboards and reports.
• Collaboration Layer:
• Shared workspaces, user access control, version management.
Power BI Desktop
• Features:
• Connect to multiple data sources.
• Build custom data models.
• Create interactive visualizations.
• Use Cases:
• Creating sales reports.
• Analyzing customer data.
Power BI Service
• Key Functions:
• Publish reports created in Power BI Desktop.
• Share dashboards with team members.
• Set up scheduled data refreshes.
• Benefits:
• Accessibility from any device.
• Centralized report sharing and collaboration.
Power BI Mobile
•Capabilities:
• Description:
• On-premises reporting solution.
• Features:
• Host reports locally.
• Integrate with organizational data governance policies.
• Ideal For:
• Industries with strict compliance requirements (e.g., finance, healthcare).
Power BI Embedded
• Overview:
• Embed Power BI dashboards into custom applications.
• Use Cases:
• SaaS providers offering analytics to customers.
• Internal tools with built-in business intelligence.
Power BI Product Portfolio
• Power BI Free:
• For individual users.
• Create and share reports locally.
• Power BI Pro:
• Share and collaborate on reports across the organization.
• Power BI Premium:
• Advanced features like AI integration, paginated reports.
• Power BI Embedded:
• Integrate into apps.
Integration with Other Tools
1.Microsoft Excel:
•Import and analyze Excel datasets.
2.Azure:
•Seamless data pipelines.
3.Third-Party Applications:
•APIs for external data sources.
Data Connectivity in Power BI
• Types of Connections:
• Import Mode: Data is imported and stored in Power BI.
• DirectQuery Mode: Live connection to the data source.
• Live Connection: Real-time updates from source systems.
• Supported Sources:
• SQL Server, Azure, Google Analytics, Salesforce, and more.
Security in Power BI
•Features:
1.Finance:
•Budget analysis, profit margin tracking.
2.Healthcare:
•Patient data analysis, operational efficiency.
3.Retail:
•Sales trends, customer segmentation.
4.Manufacturing:
•Supply chain optimization, quality control.
Case Study: Power BI in Action
•Industry: Retail
•Solution:
•Power BI dashboards to monitor stock levels in real-time.
•Outcome:
•Reduced stockouts by 30%.
Power BI AI Features
•AI-Powered Insights:
•Identify trends and patterns automatically.
•Trends:
•Enhanced AI capabilities.
•Deeper integration with Microsoft ecosystem.
•Increased customization options for businesses.
Assignment: Exploring Power BI Concepts
and Applications
■ Objective:
■ To deepen your understanding of Power BI’s capabilities, architecture, and product
portfolio through research and hands-on application.
■ Instructions:
1. Review the Presentation:
1. Go through the slides to understand the key components and features of Power BI.
2. Research Task:
1. Find a real-world case study of Power BI’s implementation in any industry.
2. Write a summary (200-300 words) detailing:
1. The challenge faced by the organization.
2. How Power BI was used to address the challenge.
3. The outcomes achieved.
Continuation …
3. Practical Exercise:
1. Using Power BI Desktop (or any alternative data visualization tool if unavailable),
create a simple dashboard using sample data. Suggested datasets:
1. Sales performance data.
2. Customer demographics.
3. Financial metrics.
2. Include at least two visualizations (e.g., bar chart, pie chart, line graph) and describe
the insights gained.
4. Answer Questions:
1. What are the key components of Power BI, and how do they work together?
2. Why is data modeling important in Power BI?
3. How can Power BI improve decision-making in businesses?
Continuation …
5. Submission:
1. Compile your research, dashboard screenshots, and answers into a document or
presentation.
2. Submit by [Insert Due Date].
■ Evaluation Criteria:
• Depth of research and relevance of the case study.
• Creativity and accuracy in dashboard creation.
• Clarity and completeness in answering questions.
• Overall presentation and formatting.
POWER BI
DAY 5 – CONNECTING TO POWER BI
Introduction to Power BI Desktop
Custom Visualizations
Key Features
of Power BI Data Modeling
Desktop
Data Transformation
• Sections:
• Ribbon: Access to tools and options.
• Report View: Build visualizations.
• Data View: Inspect and transform data.
• Model View: Manage relationships between
tables.
POWER BI
DESKTOP
USER
INTERFACE
Report View: Create and
customize visuals.
Different
Views in
Data View: Clean and transform
Power BI datasets.
Desktop
•Visualization pane.
•Filters pane.
•Fields pane.
Exploring Data View
• Purpose:
• View and prepare data before analysis.
• Capabilities:
• Add calculated columns.
• Modify data types.
• Example: Adjusting sales data for analysis.
Navigating Model View
•Purpose:
•Key Functions:
•Drag-and-drop relationships.
•Define cardinality and cross-filtering.
Pre-Built Connectors in Power BI
•What Are Pre-Built Connectors?
•Ready-made tools to connect to data sources.
•Examples:
•SQL Server, Excel, SharePoint, Google Analytics.
•Benefits:
•Saves time and effort.
Connecting to Data Sources
• Cloud-based data.
• On-premises data.
• Structured and unstructured data.
Steps to Connect to Data Sources
1.Open Power BI Desktop.
•Steps:
1.Choose Excel under Get Data.
2.Browse and select the file.
3.Preview and load sheets or tables.
•Steps:
1.Choose SQL Server under Get Data.
2.Enter server name and database details.
3.Specify a query or load tables.
• Steps:
• Choose Web under Get Data.
• Enter the URL of the web page or API.
• Transform data as required.
•Steps:
1.Choose the Azure connector under Get Data.
2.Log in to Azure.
3.Select the dataset (e.g., Azure SQL, Blob Storage).
•Steps:
1.Drag fields to the canvas.
2.Choose visualization types (bar, line, pie charts, etc.).
3.Apply filters and formatting.
•Options:
•Publish to Power BI Service.
•Export to PDF or PowerPoint.
■ Go to https://exchangeratesapi.io/
■ Click on Get Free API Key button on the top corner of the website.
■ Select Free for Subscription.
■ Enter your personal details.
■ Click on “I’m not a Robot”
■ Click Sign Up.
■ After that sign in to your account to get your access key to perform the Exercise.
Example Activity – Connecting with
external web source
Connecting to an External API for Exchange Rates:
1.Get the API URL:
•Obtain the API endpoint for exchange rates (e.g., from OpenExchangeRates or ExchangeRate-
API).
•Example URL: https://api.exchangeratesapi.io/v1/latest?access_key= <Enter your access key>
2.Connect Power BI to the API:
•Click Home > Get Data > Web.
•Enter the API URL in the dialog box and click OK.
•If authentication is required, choose the appropriate method (e.g., API key) and enter the
credentials.
3.Transform the Data:
•Use Power Query Editor to parse JSON or XML data returned by the API.
•Extract relevant fields (e.g., Currency, ExchangeRate) and format them into a table
Summary
•Key Takeaways:
3. Data Transformation:
1. Import a dataset into Power BI and perform at least two data transformation tasks (e.g.,
removing columns, filtering data, or adding calculated columns).
2. Provide screenshots of your data before and after transformation.
4. Building a Report: (Try)
1. Create a simple report with at least three visualizations:
1. A bar chart.
2. A slicer for interactivity.
3. Any other visualization of your choice.
2. Share a brief explanation of your report and its purpose.
5. Reflection:
1. Write 100-150 words reflecting on your experience using Power BI Desktop. What did you find
easy, and what was challenging?
Submission
■ Invite Questions: "Feel free to ask any questions about Power BI Desktop!"
References
•Purpose:
•Learn how to load data into Power BI, prepare it using Power Query Editor, and import Excel files effectively.
•Key Topics:
•Data loading process.
•Power Query Editor overview.
•Importing data from Excel.
Power BI Data Loading Workflow
•Steps:
1.Access data sources.
2.Load data into Power BI.
3.Prepare data in Power Query Editor.
4.Build and visualize reports.
Supported Data Sources in Power BI
•Examples:
•Files: Excel, CSV, XML.
•Databases: SQL Server, Oracle, MySQL.
•Online Services: SharePoint, Google Analytics.
•Others: APIs, OData feeds.
•Key Features:
•Remove duplicates.
•Pivot and unpivot columns.
•Create calculated columns.
1-Ribbon
2-Query view
3-Properties and Applied Steps
4-Data Preview
5-Formula Bar
Accessing Power Query Editor
•Steps:
1.Open Power BI Desktop.
2.Click on Home > Transform Data.
3.The Power Query Editor interface will
open.
Power Query Editor Interface Overview
• Sections:
• Ribbon: Transformation tools.
• Query Pane: List of active queries.
• Data Preview Pane: Shows the current state of the data.
• Properties Pane: Displays query metadata.
Importing Excel Data into Power BI
•Steps:
1.Select Excel under Get Data.
2.Browse and choose the file.
3.Select sheets or tables to load.
4.Load (if it is cleaned data) or transform data (if it is not cleaned data).
• Transformations:
• Filter rows and columns.
• Change data types.
• Add calculated columns.
• Include an example transformation process.
Cleaning Data with Power Query Editor
•Common Tasks:
•Removing empty rows/columns.
•Replacing values.
•Splitting columns.
Using Power Query Editor for Data Preparation
For Retail_Sales_Analysis_New.xlsx,
Once you click Transform Data, the Power Query Editor opens:
•Explore the Data:
•Check the sheets or tables available in the file.
•Use the Data Preview Pane to inspect the data.
•Data Cleaning:
•Remove unnecessary columns or rows.
•Handle missing values by replacing them or removing rows.
•Transformations:
•Filter rows based on conditions (e.g., sales greater than $1000).
•Change data types (e.g., ensure date columns are in Date format).
•Rename columns to make them more descriptive.
Merging and Appending Queries
•Steps:
1.Click on Close & Apply in Power Query Editor.
2.Wait for data to load into Power BI.
•Visualization Basics:
• Common Problems:
• Missing data.
• Incorrect data types.
• Connection errors.
• Solutions:
• Check data source configurations.
• Use Power Query Editor for fixes.
Example Activity
Steps to Perform Operations in Power BI
Correct Misspelled Entries in
PC1.1: Import Datasets into Power BI
ProductName:
1.Open Power BI Desktop. Navigate to the Products table.
2.Click Home > Get Data > Excel Workbook. Select the ProductName column.
3.Browse to the file location Use Replace Values to fix typos (e.g.,
(Retail_Sales_Analysis_New.xlsx) and select it. "Prduct1" → "Product1").
4.In the Navigator window:
•Select the desired sheets (e.g., Sales, Customers, Standardize Region Names in Customers:
Products). Go to the Customers table.
•Click Load or Transform Data for further cleaning. Select the Region column.
•Once the cleaning is complete, click Close & Apply to save changes
and load the cleaned data into Power BI.
Best Practices for Data Loading
•Tips:
Submission Guidelines:
•Submit the following files:
•The .pbix Power BI file with your transformations and visualizations.
•A Word file with reflection and report
Summary
•Key Takeaways:
■ Invite Questions: "Let’s discuss any queries or challenges you face in data loading
and preparation!"
References
•Resources:
• Datasets Used:
• Sales Data
• Customer Data
• Product Data
• Key Attributes:
• Sales: Quantity, Unit Price, Discounts
• Customers: Region, Join Date
• Products: Categories, Suppliers
Loading Data into Power BI
•Steps:
1.Open Power BI Desktop.
2.Click Home > Get Data > Excel.
3.Select "Retail_Sales_Analysis_New.xlsx."
4.Choose the relevant sheets (Sales, Customers, Products).
Transforming Data
• Goals:
• Handle missing data.
• Standardize formats.
• Create relationships between tables.
• Steps:
• Navigate to Transform Data.
• Identify and replace nulls in "UnitCost."
• Change data types (e.g., dates, currency).
Merging Tables
•Purpose:
•Combine Sales and Products by "ProductID."
•Enrich Sales data with product categories.
•Steps:
1.Go to Transform Data.
2.Use Merge Queries.
3.Select "ProductID" as the key.
Adding Calculated Columns
• Example Calculations:
• Profit = (Total Sale Amount) - (Quantity x UnitCost).
• Discounted Price = Unit Price - (Unit Price x Discount).
• Steps:
• Open Data View.
• Create new columns using DAX.
Data Visualizations
• Charts Used:
• Sales by Region (Map Chart).
• Top-Selling Products (Bar Chart).
• Monthly Sales Trends (Line Chart).
• Steps:
• Navigate to Report View.
• Drag fields into visualizations.
Advanced Query Options
• Applied Steps:
• Filter: Only show sales > $500.
• Conditional Columns: Tag high-margin products.
• Steps:
• Go to Query Editor.
• Add filters and conditions.
Using Relationships in Power BI
•Steps:
2.Create relationships:
•Sales[CustomerID] -> Customers[CustomerID].
•Sales[ProductID] -> Products[ProductID].
• Use Case:
• Compare sales year-over-year.
• Steps:
• Create a Date Table.
• Use DAX functions like TOTALYTD, SAMEPERIODLASTYEAR.
Interactive Dashboards
• Features:
• Slicers for Region and Category.
• Drill-through to detailed reports.
• Steps:
• Add slicers for interactivity.
• Link visuals to slicers.
Sharing and Publishing
•Steps:
1.Save report.
2.Publish to Power BI Service.
3.Configure scheduled refreshes.
Hands-On Activity Overview
• Objective:
• Transform and analyze sales data.
• Tasks:
• Load the dataset.
• Create relationships.
• Add calculated fields.
• Build visualizations.
Activity - Step 1: Data Loading
•Instructions:
•Import "Retail_Sales_Analysis_New.xlsx" into Power BI.
•Load all three sheets.
Activity - Step 2: Data Cleaning
•Tasks:
•Steps:
•Add "Profit" column: Profit = [TotalSaleAmount] - ([Quantity] * [UnitCost]).
•Create "Discounted Price."
Activity - Step 4: Build Relationships
•Steps:
•Link "Sales" and "Products" tables using "ProductID."
•Verify relationship settings.
Activity - Step 5: Visualize Data
•Tasks:
•Create a bar chart for top-selling categories.
•Build a line chart for monthly sales trends.
•Use slicers for regions.
Power BI Assignment
Objective:
Apply the concepts of data transformation, calculated columns, relationships,
and visualizations in Power BI using the provided dataset.
Tasks:
1.Data Preparation:
•Load the "Retail_Sales_Analysis_New.xlsx" dataset into Power BI.
•Inspect and clean data (handle nulls, standardize formats).
2.Transformations:
•Merge the "Sales" and "Products" tables using the "ProductID" column.
•Add a new calculated column: Profit = [TotalSaleAmount] - ([Quantity] * [UnitCost]).
Power BI Assignment
3. Modeling:
•Create relationships between the tables:
•Sales[CustomerID] → Customers[CustomerID]
•Sales[ProductID] → Products[ProductID]
4. Visualizations:
•Create a bar chart showing top-selling product categories.
•Build a line chart for monthly sales trends.
•Add slicers for region and product category for interactivity.
5. Publish:
•Save the report and publish it to Power BI Service.
•Share the dashboard with at least one other user.
■ Submission:
• A Power BI file (.pbix) containing your completed transformations and visualizations.
• Screenshots of key steps (data cleaning, relationships, and charts).
• A short write-up summarizing your process and insights.
Wrap-Up and Q&A
•Summary of steps:
•Data transformation.
•Calculations and relationships.
•Interactive dashboards.
■ 1.Missing values.
■ 2. Duplicate entries.
■ 3. Inconsistent formats.
■ 4. Outliers.
■ 5. Erroneous data.
Techniques for Cleaning Data
■ 1. Accuracy.
■ 2. Completeness.
■ 3. Consistency.
■ 4. Timeliness.
Dataset structure
• Open the dataset in Power BI or any tool like Excel for an initial review.
• Check for the following:
• Missing values.
• Invalid or out-of-range entries.
• Duplicates.
Identify Issues
Observed Issues:
1.Missing Values:
•Date column (e.g., Row 3, 6).
•Score column (e.g., Row 2, 6).
•Category column (e.g., Row 5).
2.Invalid Entries:
•Score has -1 (Row 4) and 999 (Row 8).
•Date has "InvalidDate" (Row 8).
3.Duplicates:
•Row 5 (duplicated).
4.Incomplete Rows:
•Row 7: Missing Name.
5.Erroneous Data:
•N/A entry in Category (Row 10).
•Mixed types in columns (e.g., Notes).
Cleaning Steps
Step 1: Handle Missing Values
•Date Column:
•Replace missing dates with the median date or a placeholder (e.g., "01-01-1900").
•Score Column:
•Fill missing scores with the average score.
•Category Column:
•Replace missing categories with "Unknown."
Step 2: Standardize Formats
•Convert the Date column to a consistent format (e.g., DD-MM-YYYY).
•Standardize the Category column by replacing N/A with "Not Available."
Step 3: Remove Invalid Entries
•For Score:
•Remove rows with out-of-range values like -1 and 999.
Step 4: Remove Duplicates
•Identify duplicates using all columns and keep the first occurrence.
Step 5: Correct Erroneous Data
•Replace "InvalidDate" in the Date column with a placeholder.
Transforming the Data
•Derived Metrics:
•Count of entries per category.
•Average score per category.
Validation
•Spot Check:
•Verify cleaned data for consistency.
•Steps Involved:
• 1. Loading the dataset.
• 2. Identifying errors.
• 3. Cleaning and transforming data.
Loading Data in Power BI
■ Steps:
■ 1. Open Power BI Desktop.
■ 2. Select "Get Data > Excel".
■ 3. Load "Retail_Sales_Analysis_New.xlsx."
Identifying and Handling Missing Data
■ Steps:
■ 1. Go to the Sales table.
■ 2. Use "Remove Duplicates" in Query Editor.
■ 3. Save changes.
Data Transformation Techniques
■ 1. Splitting columns (e.g., splitting "FullName" into First and Last Name).
■ 2. Creating calculated fields (e.g., "Profit").
■ 3. Grouping data (e.g., Monthly sales totals).
Visualizing Clean Data
■ Examples:
■ - Cleaned sales trends.
■ - Top product categories chart.
■ - Add slicers for interactivity.
Validating Data Quality
■ Steps:
■ 1. Perform spot checks on transformed data.
■ 2. Use DAX functions for validation.
■ - Example: Count the rows before and after cleaning.
Publishing and Sharing
■ Key takeaways:
■ - Importance of cleaning and transforming data.
■ - Tools to address errors.
■ - Techniques for ensuring data quality.
Additional Resources
■ Introduction to DAX.
■ Power Query Editor Overview.
■ Creating Custom Columns.
■ Using Date Hierarchies.
■ Best Practices for Data Transformation.
■ Hands-on Activity.
What is DAX?
■ Definition:
■ Data Analysis Expressions (DAX) is a library of functions for Power BI.
■ Uses:
■ Calculated columns.
■ Measures for analysis.
■ Examples:
■ SUM(), IF(), DATEADD().
Key DAX Functions
■ Aggregation:
■ SUM(), AVERAGE().
■ Logical:
■ IF(), SWITCH().
■ Time Intelligence:
■ DATEADD(), TOTALYTD().
■ Text Functions:
■ CONCATENATE(), LEFT().
DAX
■ Removing duplicates.
■ Filtering rows.
■ Splitting columns.
■ Transforming data types.
Creating Custom Columns
•Steps:
1.Go to Power Query Editor.
2.Click "Add Column."
3.Define your formula.
•Example:
•Profit = [Revenue] - [Cost].
What are Date Hierarchies?
• Definition: Built-in grouping of date columns into levels like Year, Quarter, Month,
Day.
• Benefits:
• Simplifies time-based analysis.
• Enables drill-downs.
• Example: Monthly sales trends.
Enabling Date Hierarchies
•Steps:
1.Select a Date column.
2.Enable hierarchy from the Fields pane.
• Steps:
• Open Power BI.
• Go to "Get Data" → Excel.
• Load the file.
Step 2 – Clean Data
• Tasks:
• Remove duplicates.
• Fill missing values.
• Standardize formats.
Step 3 – Create Custom Columns
•Example:
•TotalProfit = [SalesAmount] - ([Quantity] * [UnitCost]).
Step 4 – Use Date Hierarchies
• Example:
• Create monthly and yearly sales charts using hierarchies.
Step 5 – Create Visualizations
•Power BI documentation.
•DAX and Power Query tutorials.
POWER BI
DAY 10 - Calculations & Measures - Part 2
Agenda
■ Definition: Data Analysis Expressions (DAX) are formulas for data modeling in Power
BI.
■ Use Cases:
■ Creating calculated columns
■ Defining measures
■ Adding custom aggregations
Common DAX Functions
•Steps:
1.Go to Modeling > New Measure.
2.Enter the formula and add it to a visualization.
•Explanation:
•SUMX: Calculates the row-by-row multiplication of Quantity and UnitCost from the Products table using the
RELATED function.
•DIVIDE: Ensures safe division, handling cases where Total Revenue might be zero.
Introduction to M-Query Language
• Steps to Access:
• Click on Transform Data.
• Use the ribbon for transformations.
• Common Transformations:
• Changing data types
• Removing duplicates
• Creating custom columns
Hands-on Activity Overview
■ Steps:
■ Open Power BI Desktop.
■ Select Get Data > Excel Workbook.
■ Load "Retail_Sales_Analysis_New.xlsx."
Activity Step 2 - Create Bar Chart
■ Objective:
■ Calculate total profit.
■ Formula:
■ Total Profit = SUM(Sales[Amount]) - SUM(Sales[Cost])
■ Steps:
■ Go to Modeling > New Measure.
■ Use the formula above and apply it.
Activity Step 5 - Use M-query for
Transformation
• Objective: Rename columns and filter data.
• Steps:
• Open Power Query Editor.
• Rename columns and remove null values.
Advanced Visualization Tips
1. Define Data Modeling in Your Own Words: Explain the significance of data modeling
in Power BI.
2. Create a Star Schema Model:
1. Use 'Retail_Sales_Analysis_New.xlsx' to create a star schema in Power BI.
2. Identify the fact table and at least three dimension tables.
3. Create Relationships in Power BI:
1. Connect the fact and dimension tables.
2. Provide screenshots of your model view.
Assignment
■ Q&A
• Open Floor for Questions
References & Further Reading