Power Query Practice – Single Dataset & 10 Problem Statements
Sample Dataset: Sales_Transactions
OrderID | OrderDate | CustomerName | City | Product | Category | Quantity | UnitPrice |
Status | Region
1001 | 12-01-2023 | Ramesh | Mumbai | Laptop | Electronics | 2 | 55000 | Delivered | West
1002 | 15-01-2023 | Sita | Delhi | Phone | Electronics | 1 | 30000 | Returned | North
1003 | 18-02-2023 | Aman | Pune | Chair | Furniture | 4 | 3500 | Delivered | West
1004 | 22-02-2023 | Neha | Chennai | Table | Furniture | 1 | 12000 | Delivered | South
1005 | 05-03-2023 | Ravi | Mumbai | Shoes | Apparel | 3 | 2500 | Delivered | West
1006 | 12-03-2023 | Pooja | Delhi | Watch | Accessories | 1 | error | Delivered | North
1007 | 18-03-2023 | Kiran | Pune | Laptop | Electronics | 1 | 55000 | Cancelled | West
1008 | 25-03-2023 | Sita | Delhi | Chair | Furniture | 2 | 3500 | Delivered | North
1009 | 02-04-2023 | Aman | Pune | Phone | Electronics | null | 30000 | Delivered | West
1010 | 10-04-2023 | Neha | Chennai | Shoes | Apparel | 2 | 2500 | Delivered | South
1011 | 15-04-2023 | Ramesh | Mumbai | Table | Furniture | 1 | 12000 | Delivered | West
1012 | 20-04-2023 | Ravi | Mumbai | Watch | Accessories | 2 | 8000 | Delivered | West
Problem Statements
1. Load the Sales_Transactions dataset into Power Query Editor and promote the first row
as headers.
2. Rename UnitPrice to Price_per_Unit, remove Status column, and duplicate Category
column.
3. Convert OrderDate to Date, Quantity to Whole Number, and Price_per_Unit to Decimal.
Handle errors.
4. Filter records to show only Delivered orders where Price_per_Unit > 10000.
5. Create Order_Value_Type column: High Value if Total ≥ 50000 else Normal Value.
6. Add Total_Sales column (Quantity × Price_per_Unit) and Index column starting from 1.
7. Trim CustomerName, convert City to Proper Case, replace Electronics with Elec.
8. Extract Year & Month from OrderDate and calculate Days Since Order.
9. Group by Category and calculate Total Sales and Total Quantity.
10. Handle errors in Price_per_Unit, replace with 0, remove null Quantity rows, and sort by
Total_Sales.