{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreiggz42zv2qm2fvmglzohf7nqlxq6vdnorwoe7rvt4skcwx4ou7lq4",
    "uri": "at://did:plc:25rdn5elo5izoxrmtis34zuk/app.bsky.feed.post/3mpek4ubwk2c2"
  },
  "coverImage": {
    "$type": "blob",
    "ref": {
      "$link": "bafkreiel2t3lnoecxmssrnrrlgk437vneqzd5cqkcrxestdda3sfwax6py"
    },
    "mimeType": "image/webp",
    "size": 53654
  },
  "path": "/pragnesh_pomal/power-bi-4e0m",
  "publishedAt": "2026-06-28T17:20:36.000Z",
  "site": "https://dev.to",
  "tags": [
    "powerbi",
    "powerquery",
    "studentnotes",
    "dax"
  ],
  "textContent": "**What is Power BI?**\n\nPower BI is a **business intelligence tool** made by Microsoft. It lets you:\n\n  * Connect to data (Excel, CSV, databases, websites, etc.)\n  * Clean and transform that data\n  * Build relationships between tables\n  * Create interactive visual reports and dashboards\n  * Share those reports with other people online\n\n\n\n##  __\n\n__\n\n##  __Step 1: Connecting to Data__\n\nThe first thing you do in Power BI is connect to a data source. You go to:\n\n**Home → Get Data → choose your source**\n\nSources we connected to in class:\n\n  * Excel workbooks\n  * CSV / text files\n  * SQL Server databases\n  * SharePoint lists\n  * Web URLs (yes, you can pull data directly from a website!)\n\n\n\n_Once connected, Power BI opens**Power Query Editor** where the real work begins._\n\n##  _Step 2: Cleaning Data in Power Query_\n\nPower Query is Power BI's built-in data cleaning tool. This is where you transform your raw, messy data into something usable before loading it into your model.\n\nEverything you do here is recorded as steps on the right side panel called **_Applied Steps_.** This means you can undo any step at any time without losing your work.\n\nTransformations we learned:\n\nTransform | What it does | When to use it\n---|---|---\nRemove Duplicates | Deletes repeated rows | Cleaning ID or key columns\nFill Down | Fills blank cells with the value above | Fixing merged cell exports from Excel\nUnpivot Columns | Turns column headers into row values | Reshaping wide data into tall data\nMerge Queries | Joins two tables together (like SQL JOIN) | Combining related tables\nSplit Column | Splits one column into two by a delimiter | Separating first and last names\nChange Data Type | Sets the correct type (text, number, date) | Making sure dates are read as dates\nAdd Custom Column | Creates a new column using an M formula | Row-level calculations at query stage\nRemove Rows | Removes top rows, blank rows, errors | Cleaning header junk from messy files\n\n##  _Step 3: Data Modeling_\n\nAfter cleaning your data, you move to the **Model view.** This is where you define how your tables relate to each other.\n__\n\n__\n\n##  _The Star Schema_\n\nThe recommended structure for Power BI models is called a **star schema:\n\n  * One central **Fact table** — this holds your transactions or events (sales, orders, payments)\n  * Multiple **Dimension tables** around it — these describe the facts (customers, products, dates, regions)\n\n\n\nRelationships go **from the dimension table to the fact table** on a one-to-many basis.\n\n##  Types of relationships:\n\nCardinality | Meaning | Example\n---|---|---\nOne-to-many (1:*) | One record in table A matches many in table B | One customer → many orders\nMany-to-many (_:_) | Both sides have multiple matches | Students ↔ courses (needs a bridge table)\nOne-to-one (1:1) | Each record matches exactly one | Employee → employee detail table\n\n**Cross filter direction**\nRelationships have a **filter direction** — either Single or Both. Single means filters flow one way (from dimension to fact). Both means filters flow both ways. We were told to stick with Single unless you have a specific reason to change it.\n\n##  _Date Table_\n\nOne big thing we learned — always create a **dedicated Date table.** Mark it as a Date Table in the model settings. DAX time intelligence functions absolutely require this to work correctly.\n\n##  _Step 4: DAX — The Formula Language_\n\nDAX stands for **Data Analysis Expressions.** It's the language used to write formulas in Power BI. It looks similar to Excel but behaves very differently.\n\n> _The biggest mindset shift: in Excel you write formulas for individual cells. In DAX, you write formulas for entire columns or measures, and the**filter context** changes the result depending on where it's used in the report._\n\n###  DAX functions we covered:\n\n**Basic aggregations:**\n\n  * `SUM()` — adds up a column\n  * `AVERAGE()` — average of a column\n  * `COUNT()` / `COUNTROWS()` — counts values or rows\n  * `MIN()` / `MAX()` — smallest or largest value\n  * `DIVIDE()` — safe division (handles divide by zero automatically)\n\n\n\n**Logical functions:**\n\n  * `IF()` — if/else logic\n  * `SWITCH()` — cleaner alternative to nested IFs\n\n\n\n**Filter functions:**\n\n  * `CALCULATE()` — the most important DAX function. Evaluates an expression in a modified filter context\n  * `FILTER()` — returns a filtered table\n  * `ALL()` — removes filters from a column or table\n  * `ALLEXCEPT()` — removes all filters except the ones you specify\n\n\n\n**Relationship functions:**\n\n  * `RELATED()` — pulls a value from a related table (like VLOOKUP)\n  * `RELATEDTABLE()` — returns the related table\n\n\n\n**Time intelligence functions:**\n\n  * `TOTALYTD()` — year-to-date total\n  * `TOTALQTD()` — quarter-to-date total\n  * `SAMEPERIODLASTYEAR()` — compares to the same period last year\n  * `DATEADD()` — shifts a date period forward or backward\n\n\n\n> **CALCULATE** was the hardest one to understand. Basically — it lets you change the filter context of any measure. Once you get it, everything else makes sense.\n\n##  _Step 5: Building Visuals_\n\nThis is the fun part! The **Report view** is a drag-and-drop canvas. You place visuals, connect them to your measures and dimensions, and build your report page.\n\n**Visual types we used:**\n\nVisual | Best used for\n---|---\nBar / Column chart | Comparing categories\nLine chart | Showing trends over time\nPie / Donut chart | Part-to-whole (max 5 slices!)\nCard visual | Displaying a single KPI number\nMatrix | Pivot-table style breakdowns with subtotals\nTable | Showing detailed row-level data\nMap | Plotting values geographically\nSlicer | Filter controls that users click on the canvas\nScatter chart | Showing correlation between two measures\nWaterfall chart | Showing how values build up or break down\n\n**_Design rules our lecturer gave us:_**\n\n  * One insight per visual — don't try to show everything in one chart\n  * Maximum 5 to 6 visuals per report page\n  * Always label your axes\n  * Use slicers to let users filter the report themselves\n  * Don't use pie charts with more than 5 slices — they become unreadable\n  * Consistent colours across the whole report\n  * If a stakeholder has to ask what they're looking at, the design has failed\n\n\n\n###  Interactions between visuals\n\nBy default, clicking on one visual filters all the others on the page. You can customise this under **Format → Edit interactions** to control which visuals get filtered and which don't.\n\n##  __\n\n__\n\n##  _Step 6: Exporting / Downloading Your Table_\n\nSometimes you need to get your cleaned data OUT of Power BI as a file.\n\n**Method 1 — From Power Query Editor:**\n\n  1. Open Power Query Editor (Home → Transform data)\n  2. Select your table\n  3. Click File → Export → choose CSV\n  4. Save to your PC\n\n\n\n**Method 2 — From a Table Visual (most common):**\n\n  1. Add a Table visual to your report canvas\n  2. Click the three dots (…) on the visual\n  3. Click Export data\n  4. Choose Underlying data → Export\n  5. A `.xlsx` or `.csv` downloads automatically\n\n\n\n**Method 3 — From Power BI Service:**\n\n  1. Publish your report to app.powerbi.com\n  2. Open it in the browser\n  3. Hover over the visual → three dots (…) → Export data\n  4. Choose your format and download\n\n\n\n##  _Step 7: Publishing and Sharing_\n\nOnce your report is done, you publish it to the **Power BI Service.**\n\n**Home → Publish → Select your Workspace**\n\nFrom the Service you can:\n\n  * Create a **Dashboard** by pinning tiles from your report\n  * Set a **scheduled data refresh** so your report stays up to date automatically\n  * Share the report with colleagues by email or link\n  * Embed the report into Microsoft Teams, SharePoint, or a website\n  * Set up **Row-Level Security (RLS)** so different users see different data\n\n\n\n> **Dashboard vs Report — I kept confusing these:**\n>\n>   * A **Report** has multiple pages, detailed visuals, full interactivity\n>   * A **Dashboard** is a single page of pinned tiles — a quick overview for monitoring KPIs\n>\n",
  "title": "Power BI"
}