0% found this document useful (0 votes)
24 views12 pages

Lab File Power BI MD Nadim

power bi file use for power bi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views12 pages

Lab File Power BI MD Nadim

power bi file use for power bi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Power BI Practical Lab Assignment

Course:
M.Sc. Banking and Financial Analytics – Semester II
Submitted By: Md Nadim
Enrollment Number: [24-03437]
Department: Dept. Of Economics
University: [Jamia Millia Islamia]

Instructor: [Dr. Malik Nadeem]


Date of Submission: [29th of May 2025]
Q1. Bar Charts – Sum of Sale Price by Area
Dataset Used: ny_property_sales.csv
Steps:
1. Imported the dataset into Power BI.
2. Replaced null and zero values in the Sale Price column using Power Query.
3. Ensured Sale Price is in numeric format.
4. Created a vertical bar chart:
o Axis: Area
o Values: Sum of Sale Price
5. Created a horizontal bar chart with the same fields.
6. Customized titles and added data labels.
Outcome: Two clean bar charts showing total sales price by area.
Q2. Data Cleaning – sales2017_raw.csv
Dataset Used: sales2017_raw.csv
Steps:
1. Imported the sales2017_raw.csv file into Power BI Desktop.
2. Opened Power Query Editor by selecting Transform Data to perform data cleaning.
3. Checked for and removed blank rows by using Remove Rows > Remove Blank Rows
to ensure no empty data affects analysis.
4. Reviewed all columns and selected only relevant columns needed for the
assignment, removing unnecessary columns to simplify the dataset.
5. Inspected data types for each column:
o Converted date columns to Date type.
o Set numeric columns (e.g., sales, quantity) to Decimal Number or Whole
Number.
o Ensured text columns are in Text format.
6. Used Replace Values to fix:
o Missing entries (null or blanks).
o Incorrect or inconsistent values (e.g., typos, wrong formatting).
o Example: Replaced blank or zero values in sales columns with proper
estimates or zero where applicable.
7. Renamed columns with meaningful names to improve clarity during visualization and
reporting.
8. Checked for duplicate records if necessary and removed duplicates.
9. Applied all changes and closed Power Query Editor to load the cleaned dataset into
Power BI.
Outcome:
The dataset was cleaned by removing blanks, correcting data types, fixing missing/incorrect
values, and renaming columns. This prepared the data for accurate and efficient analysis in
subsequent steps.
Q3. Data Modeling and Revenue Analysis by Product Category
Datasets Used: stores.csv, product_hierarchy.csv, sales_2017.csv
Steps:
1. Loaded all three datasets into Power BI.
2. Opened Model View to create relationships:
o Linked sales_2017[Store ID] to stores[Store ID]
o Linked sales_2017[Product ID] to product_hierarchy[Product ID]
3. Verified relationships are active and one-to-many where needed.
4. Created a column chart:
o Axis: Product Category (from product_hierarchy)
o Values: Sum of Revenue (from sales_2017)
5. Sorted the chart to identify the highest revenue-generating category.
Outcome: Relationship model built successfully. Identified the product category with the
highest total revenue from the chart.
Q4. Pie Chart – Revenue by State
Datasets Used: Same model from Q3 (stores.csv, sales_2017.csv)
Steps:
1. Used the existing relationship model.
2. Created a Pie Chart visualization.
3. Added State (from stores.csv) to Legend.
4. Added Sum of Revenue (from sales_2017.csv) to Values.
5. Enabled Data Labels and set to Percentage.
6. Added a clear Legend for state identification.
Outcome: Pie chart showing each state’s revenue share as a percentage with proper labels
and legend.
Q5. Line Chart – Revenue Over Time with Drill Down
Datasets Used: sales_2017.csv (with date column), and related tables from Q3
Steps:
1. Ensured Date column in sales_2017.csv is in Date format.
2. Created a Line Chart:
o Axis: Date (used Date Hierarchy: Year > Quarter > Month > Day)
o Values: Sum of Revenue
3. Enabled Drill Down mode to explore different time levels.
4. Used the arrow icons to switch between Year, Quarter, Month, Day views.
Outcome: Interactive line chart showing revenue trends over time with drill-down capability.
Q6. Table Visual with Conditional Formatting
Dataset Used: sales_2017.csv
Steps:
1. Created a Table visual.
2. Added the following fields:
o Order Date
o Revenue
o Order ID (used Count to get Number of Orders)
3. Applied custom styles: background color, font style, column alignment.
4. Used Conditional Formatting > Icons on the Revenue column:
o Green icon for Revenue ≥ 80%
o Yellow icon for Revenue ≥ 50% and < 80%
o Red icon for Revenue ≥ 0 and < 50%
5. Set icon rules based on revenue percentage scale.
Outcome: Styled table with conditional icons to highlight revenue performance visually.
Q7. Horizontal Stacked Bar Chart – Store Costs by Category
Dataset Used: stores.csv
Steps:
1. Opened Power Query Editor.
2. Selected the three cost columns:
o Building Cost,
o Land and Development Cost,
o Other Related Cost
3. Used Unpivot Columns to convert them into two columns:
o Attribute (Cost Category)
o Value (Cost Amount)
4. Clicked Close & Apply to load the transformed data.
5. Created a Stacked Bar Chart (Horizontal):
o Axis: Store ID
o Legend: Attribute (Cost Category)
o Values: Sum of Value
Outcome: Horizontal stacked bar chart showing total cost per store, split by cost category.
Q8. Slicer with Hierarchy – Store City & Store ID
Dataset Used: stores.csv
Steps:
1. Created a new hierarchy:
o Right-click on Store City, select "Create Hierarchy".
o Added Store ID under this hierarchy.
2. Inserted a Slicer visual.
3. Added the Store City > Store ID hierarchy to the slicer.
4. Created a horizontal bar chart showing:
o Axis: Store ID
o Values: Sum of Total Costs (sum of all cost fields)
5. Used the slicer to filter the bar chart interactively.
Outcome: A dynamic slicer that filters total store costs by city and store ID hierarchy.
Q9. Tree Map – Revenue by Product Category and State
Datasets Used: product_hierarchy.csv, sales_2017.csv, cities.csv
Steps:
1. Loaded the three datasets and ensured relationships:
o sales_2017 linked to product_hierarchy by Product ID.
o sales_2017 linked to cities by City or State field.
2. Created a Tree Map visual.
3. Added Product Category (from product_hierarchy) to Group.
4. Added State (from cities.csv) to Details for breakdown within categories.
5. Added Sum of Revenue (from sales_2017) to Values.
6. Adjusted formatting for clarity.
Outcome: Tree map showing revenue by product category, further broken down by state.
Q10. Bar Chart – Revenue by Weekdays
Dataset Used: sales_2017.csv (with Date Dimension table)
Steps:
1. Created a Date Dimension table:
o Referenced order_date column from sales_2017.csv.
o Removed all other columns except order_date.
o Removed duplicate dates to get unique dates.
2. Used "Column from Examples" in Power Query to create a new column
weekday_names (e.g., Monday, Tuesday) based on order_date.
3. Loaded the Date Dimension table back into Power BI.
4. Created a relationship between sales_2017[order_date] and Date
Dimension[order_date].
5. Created a Bar Chart:
o Axis: weekday_names from Date Dimension.
o Values: Sum of Revenue from sales.
6. Sorted weekdays logically (Mon to Sun) for proper display.
Outcome: Bar chart displaying total revenue distributed across weekdays.

You might also like