R Shiny is your USP. Power BI is your bilingualism. Most Indian enterprises run on the Microsoft stack, and Power BI is the default reporting tool there. This week you learn enough Power BI - Power Query for shaping, DAX for measuring, star schemas for modelling - to walk into any enterprise interview and answer ``can you also do Power BI?'' with a confident yes.
What You'll Learn This Week
The Power BI Stack
- Power BI Desktop - free Windows app for authoring reports. This is where you do almost all your work.
- Power BI Service - cloud workspace for publishing, sharing and scheduled refresh.
- Power BI Mobile - read-only iOS / Android viewers.
When to use Power BI vs R Shiny
| Use Power BI when... | Use R Shiny when... |
|---|---|
| Fast standard reports for many users | Bespoke logic or interactive what-ifs |
| You live in Microsoft 365 | You need embedded statistical models |
| Row-level security via AAD groups | You want full control of the UI |
Data Connections
Get Data brings up a catalogue of 100+ connectors: Excel, CSV, SQL Server, MySQL, PostgreSQL, SharePoint, REST APIs and more. Choose your mode:
- Import - data cached in the model. Fastest queries; needs refresh schedule.
- DirectQuery - live queries against the source on each interaction. Always current, slower visuals.
- Live Connection - only for Analysis Services / PBI datasets.
Power Query
The data-cleaning workhorse
Click Transform Data to open the Power Query Editor. Every action you take is recorded as a step in Applied Steps - this is the M language behind the scenes, but you rarely need to write it by hand.
The ten transformations you'll use daily
- Promote first row to headers
- Change column types
- Filter rows; remove blanks and duplicates
- Replace values; trim and clean text
- Split column by delimiter
- Pivot / Unpivot columns
- Merge queries (left / inner / anti join)
- Append queries (union)
- Add custom column with an M expression
- Group by with aggregation
Data Modelling
Star schemas are not optional
Always create a calendar table
Mark it as a date table via Modeling → Mark as date table.
Visualisations and Reports
Power BI ships with 30+ built-in visuals. The same chart-choice rules apply as in Week 5: line for trends, bar for ranks, scatter for relationships. Avoid 3D charts, dual-axis gauges and rainbow heat-maps.
Interactive features
- Slicer - a visible filter widget on the canvas.
- Filter pane - finer-grained filters off to the side.
- Drill-through - click a category, jump to a detail page filtered to that value.
DAX Fundamentals
CALCULATE evaluates an expression in a modified filter context. Mastering CALCULATE is the difference between a Power BI beginner and a pro.
Project: Power BI Sales Dashboard
- Connect Orders, Items, Customers, Products tables.
- Build a star schema with relationships.
- Create a date table and time-intelligence measures.
- Build a three-page report: Overview, Customers, Products.
- Add slicers for region, category and date range.
- Publish to the Power BI Service; share the link.
A complete DAX kit is provided at /data/week9-powerbi-dax-snippets.txt.