AI & Data
From connecting data through Power Query, star schemas and DAX to secure, governed reports in the Service.
A complete path through Power BI: getting and cleaning data with Power Query and M, modelling a star schema, writing DAX measures, designing interactive reports, and publishing, securing and governing them in the Service. Aimed at analysts and developers building reports others rely on. Each subject links the official Microsoft documentation.
The subjects follow the roadmap.sh Power BI roadmap.
Power BI is Microsoft's business intelligence suite: you shape data with Power Query, model it as tables and relationships, write measures in DAX and publish interactive reports. Most work starts in the free Desktop app and ends in the cloud Service, where reports are shared, refreshed and secured.
Desktop for authoring, the Service for sharing and refresh, mobile apps for consumption, Report Builder for paginated reports and gateways for on-premises data. Since 2023 the Service lives inside Microsoft Fabric.
The free Windows authoring tool where you connect to sources, transform in Power Query, build the model and design report pages. Files are saved as .pbix, or as a folder-based .pbip project for source control.
app.powerbi.com: the cloud side where published semantic models are refreshed on a schedule, reports are shared, dashboards are pinned and admins manage workspaces and capacity.
iOS and Android apps for viewing reports and dashboards on the go. Authors can design a dedicated mobile layout per page so visuals are not just shrunk desktop canvases.
Free lets you author and use My workspace; Pro is needed to share and collaborate; Premium Per User adds larger models and advanced features; a Fabric/Premium capacity lets free users view shared content.
Install Desktop from the Microsoft Store to get automatic monthly updates, or the standalone installer when the Store is blocked. It is Windows only; Mac users run it in a VM.
Get Data offers hundreds of connectors. They fall into a few families — files, relational databases, cloud services and web APIs — and each family decides which connection modes, credentials and refresh options you get.
Excel, CSV, JSON, XML, PDF and Parquet, singly or a whole folder combined with Combine Files. Prefer files on SharePoint or OneDrive so the Service can refresh without a gateway.
SQL Server, Azure SQL, PostgreSQL, MySQL, Oracle, Snowflake and more. Relational sources support query folding and DirectQuery, so heavy filtering can run on the database instead of in Power BI.
SaaS and cloud platforms such as SharePoint lists, Dataverse, Salesforce, Google Analytics, Azure Data Lake and Fabric lakehouses. Authentication is usually OAuth, and cloud sources refresh without a gateway.
The Web connector, or Web.Contents in M, pulls JSON or XML from REST endpoints. Use RelativePath and Query options so the Service can validate the base URL for scheduled refresh.
Every table has a storage mode that decides where queries run: in the in-memory VertiPaq engine, against the source at query time, or straight from OneLake. The choice trades speed against freshness, model size limits and which DAX and Power Query features are available.
Data is compressed into the model and queried from memory: the fastest option with full DAX and Power Query support, but only as fresh as the last refresh and bounded by model size limits.
Every visual sends SQL to the source, so data is live and size is unlimited — but reports are only as fast as the database, some transforms and DAX functions are restricted, and many visuals mean many queries.
A Fabric-only mode that reads Delta tables in OneLake directly into the engine without an import refresh. It can fall back to DirectQuery through the SQL endpoint when limits are exceeded.
A table that is both imported and queryable live, so the engine picks whichever suits the query. Typically used for dimension tables in composite models next to DirectQuery fact tables.
The data preparation engine behind Get Data: a visual editor that records each transformation as a step in M code, re-run on every refresh. Do shaping here, as close to the source as possible, so the model receives clean, typed, narrow tables.
The ordered list of transformations on the right of the editor; each step is a named M expression built on the previous one. Rename steps meaningfully and remove redundant type changes to keep queries readable and foldable.
Column quality, distribution and profile panes show error, empty and distinct counts. By default they look at the first 1,000 rows — switch to the whole data set in the status bar before trusting them.
Most refresh failures and wrong totals come from dirty input: mixed types, duplicate keys and error cells. Fix them in Power Query so every downstream measure can trust its columns.
Set explicit types (whole number, decimal, fixed decimal, date, text) as an early step; Table.TransformColumnTypes uses a locale, which matters for dates and decimal separators from other regions.
Remove Duplicates keeps the first row per key and is case-sensitive, so trim and normalise case first. Dimension keys must be unique or relationships cannot be one-to-many.
Cell-level errors come from failed conversions or lookups. Find them with Keep Errors, then replace them, or use try ... otherwise in M to supply a fallback value per row.
The day-to-day reshaping of individual columns: cleaning text, rounding numbers, extracting date parts and deriving new columns. Prefer the ribbon commands where they exist — they generate foldable M — and drop to custom columns only when needed.
Trim, Clean, change case, add prefixes, extract before or after a delimiter. Trim does not remove non-breaking spaces, so use Text.Replace with Character.FromNumber(160) when imports look padded.
Round, absolute value, standard arithmetic against a constant and scientific functions. Use Fixed Decimal (currency) for money to avoid floating-point surprises in totals.
Extract year, month, quarter or week, compute age and durations, and convert between date, datetime and datetimezone. Do date parsing with a locale when source formats are ambiguous.
A dialog that builds an if ... then ... else chain over other columns, handy for bucketing values. For anything beyond simple comparisons, write the expression in a custom column instead.
A column defined by any M expression evaluated per row, referencing fields as [Column]. Set its type explicitly — custom columns default to any, which the model loads as text.
Split by delimiter, number of characters, positions or case transitions, into columns or into rows. Splitting into rows is the quick way to normalise multi-value cells such as tags.
Operations that combine or reshape whole tables. They often decide whether a query folds to the source and how many rows reach the model, so think about them before stacking dozens of steps.
Merge Queries performs left outer, right, full, inner, anti and fuzzy joins and returns a nested table column to expand. In a star schema, prefer relationships in the model over merging dimensions into facts.
Stack tables with matching column names (Table.Combine), such as monthly extracts. Columns are aligned by name, so a renamed header in one file silently produces nulls.
Unpivot turns month-per-column spreadsheets into tidy rows — the most useful reshaping step for modelling. Pivot does the reverse; Transpose swaps rows and columns wholesale.
M is the functional, case-sensitive language every Power Query step is written in. A query is a let expression of named steps ending with in; values include records, lists and tables, and everything is lazily evaluated.
Opens the full M script of a query for editing, reusing step patterns and pasting functions. Use it to add comments, merge type-change steps and write logic the ribbon cannot express.
Refresh time is decided mostly in Power Query: whether steps fold back to the source, how much data is loaded and whether old data is reloaded every time. Measure refresh duration and check folding before optimising anything else.
Parameters hold values such as server names or date cut-offs that change per environment; custom functions turn a query into something invoked per file or per row. Both are core to reusable, deployable models.
Power Query translating steps into a single native query run by the source. Right-click a step and check View Native Query or the folding indicators; steps such as adding an index usually break folding for everything after.
Partitions a large table by date with the RangeStart/RangeEnd parameters so the Service refreshes only recent periods. It needs a foldable source filter to be effective.
The VertiPaq engine and DAX are built for a star schema: narrow fact tables of events surrounded by descriptive dimension tables. Getting the shape right makes measures simple and fast; a single wide flat table makes both harder.
A snowflake normalises dimensions into chains (product → subcategory → category). In Power BI flatten those into one dimension per entity: fewer relationships, simpler filters, better performance.
Facts hold numeric events (sales lines, visits) with keys to dimensions; dimensions hold attributes you slice by (date, customer, product). Always add a dedicated date dimension and mark it as a date table.
The level of detail one fact row represents — one order line per day, one budget row per month. Facts at different grains need separate tables, and relating a monthly budget to a daily calendar needs care.
Relationships connect tables on a single column and define how filters propagate from one table to another. They replace most lookups and merges, and their cardinality and direction drive both correctness and speed.
One-to-many is the normal case; one-to-one usually means two tables should be one; many-to-many needs a bridge table or careful use. Only one relationship between two tables can be active — use USERELATIONSHIP for the others.
By default a dimension filters its fact table and not the reverse. Setting a relationship to Both lets facts filter dimensions too, which risks ambiguous paths and slower queries, so enable it per measure with CROSSFILTER where possible.
Beyond tables and relationships, a semantic model holds calculated objects, hierarchies, display folders and aggregation tables. These shape how report authors navigate the model and how efficiently it answers queries.
DAX-defined objects computed at refresh and stored in the model. They cost memory and do not compress as well as Power Query columns, so use them only when the logic genuinely needs model data.
Ordered column sets such as Year → Quarter → Month or Category → Product that enable drill-down in visuals. Build them in the dimension table, and turn off auto date/time to avoid hidden date tables.
Pre-summarised tables that answer high-level queries from memory while detail queries go to a DirectQuery fact table. Configured with Manage aggregations, they help with very large data.
A small model is a fast model: remove unused columns, lower cardinality (split datetime into date and time), prefer integers for keys and disable auto date/time. Then profile slow visuals rather than guessing.
A Desktop pane that records how long each visual spends on the DAX query, rendering and other work. Copy the query into DAX Query View to test and tune the slow measure on its own.
DAX (Data Analysis Expressions) is the formula language of the model, used for measures, calculated columns and tables. It looks like Excel but works on tables and filter context, which is the idea everything else builds on.
M prepares data before it lands in the model and runs at refresh; DAX calculates over the loaded model, mostly at query time. Shape and clean in M, aggregate and compare in DAX.
Measures look like Total Sales = SUM(Sales[Amount]): always qualify columns with their table, never qualify measures, and use DIVIDE instead of / to handle division by zero.
A calculated column is computed per row at refresh and stored; a measure is computed at query time in the current filter context and stores nothing. Anything you aggregate in a visual should almost always be a measure.
VAR ... RETURN names intermediate results, evaluated once in the context where they are defined. They make measures readable, avoid repeated work and simplify debugging by returning a variable temporarily.
DAX has a few hundred functions, but most measures use a handful of families. Learn what each family returns — a scalar or a table — since table functions are the building blocks for filters and iterators.
SUM, AVERAGE, MIN, MAX, COUNTROWS and DISTINCTCOUNT aggregate a column in the current filter context. COUNTROWS on a table is clearer than COUNT on a column.
IF, SWITCH, AND/OR and COALESCE. SWITCH(TRUE(), ...) is the readable way to write multi-branch conditions instead of nested IFs.
OFFSET, INDEX and WINDOW, with ORDERBY and PARTITIONBY, let a measure reach the previous, next or a range of rows — useful for running totals and period comparisons without date tables.
SUMX, AVERAGEX, MAXX and friends evaluate an expression row by row over a table, then aggregate. Needed for things like quantity × price; iterate over small tables where possible.
FILTER, ALL, VALUES, SUMMARIZECOLUMNS, ADDCOLUMNS and TOPN return tables, used as filter arguments, iterator inputs or calculated tables.
TOTALYTD, SAMEPERIODLASTYEAR, DATEADD and DATESINPERIOD shift the date filter. They need a contiguous date table marked as such and related to your facts.
Every DAX result depends on its evaluation context: which rows are being iterated and which filters are active from slicers, visuals and relationships. Understanding and changing that context is the core skill of DAX.
Row context is "the current row" inside a calculated column or iterator and does not filter anything by itself. Filter context is the set of filters applied to the model, coming from the visual and from CALCULATE.
Evaluates an expression under modified filters: added, replaced or removed with ALL, REMOVEFILTERS or KEEPFILTERS. Almost every non-trivial measure uses it.
When CALCULATE (or a measure reference) runs inside a row context, the current row becomes an equivalent filter context. Powerful for per-row measures, and the source of many surprising results and slow iterators.
Features that reduce measure sprawl and let report users choose what they see, plus the practice of making DAX fast. Use them once the model and basic measures are solid.
Templates that generate DAX for common patterns such as running totals or year-over-year change. Good for learning — read the generated code and rename it — but not a substitute for understanding it.
A generated table that lets viewers swap which measure or dimension a visual uses through a slicer, replacing many near-duplicate visuals or bookmark tricks.
DAX written on a visual's own matrix of results, with helpers like RUNNINGSUM and PREVIOUS. Simpler than model measures for visual-specific maths, but not reusable elsewhere.
Reusable modifiers such as YTD, PY or YoY% applied to any measure via SELECTEDMEASURE(), instead of writing each combination by hand. Now editable directly in Desktop's model view.
Filter columns, not whole tables, in CALCULATE; store variables instead of repeating expressions; avoid iterating big fact tables with complex row logic. Use Performance Analyzer and DAX Studio to see storage-engine versus formula-engine time.
Choosing the right visual for the question and laying out pages so the important number is read first. Each visual type has a specific job; most reports need only a few of them used well.
Put key figures top-left, group related visuals, keep a consistent grid, limit colours and visuals per page, and label clearly. Every visual should answer a question someone actually asks.
Set alt text, a logical tab order, sufficient contrast and markers that do not rely on colour alone. Test with the keyboard and a screen reader, and offer Show as table for every chart.
The default for comparing categories: horizontal bars for long labels or rankings, columns for short time series. Start the axis at zero and sort by value unless the order is meaningful.
Show trends over continuous time. Lines compare a few series; stacked areas show composition but make individual series hard to read beyond the bottom one.
Show parts of a whole for two to four categories at most; beyond that, a sorted bar chart is easier to read accurately.
Plot two measures against each other per category to reveal correlation and outliers; bubble size adds a third measure and a play axis animates over time.
Columns and a line sharing an axis, such as revenue with margin %. Use a secondary axis only when units differ, and label both clearly.
Single-number visuals for headline metrics. Cards show a value, KPI visuals add a target and trend, gauges show progress against a range — cards with context are usually clearest.
Tables list rows; matrices pivot by row and column groups with subtotals and drill-down. Use them where exact values matter, with conditional formatting for scanning.
Bubble maps, filled maps, shape maps and Azure Maps plot location data. Geocoding is guessed from text, so set data categories (country, city, postal code) or supply latitude and longitude.
Extra visuals from AppSource or built with the visuals SDK in TypeScript. Prefer certified ones, and check that your tenant allows them before relying on them.
Make reports consistent with themes and guide attention with formatting, then let users narrow the data with slicers and the filter pane. Filters exist at visual, page and report level, and their scope matters.
A JSON theme file sets colours, fonts and default visual formatting for the whole report, so you style once instead of per visual.
Colour scales, rules, data bars and icons driven by values or by a measure returning a colour. Field-value formatting from a measure keeps the logic in DAX and reusable.
Visuals sort by a chosen field; text columns like month names need Sort by column pointing at a numeric column so January does not follow August.
Slicers are on-canvas filters for users; the filter pane holds visual, page and report filters, which you can lock or hide. Sync slicers across pages when they should behave as one.
Power BI reports are explored, not just read: clicking one visual filters others, users drill into detail and buttons drive navigation. Design these paths deliberately so users can answer follow-up questions themselves.
Drill-down moves through a hierarchy within one visual; drill-through jumps to a detail page filtered to the item you right-clicked. Set up drill-through fields on the target page.
Saved states of a page — filters, slicers, visibility — that you can return to. Combined with the selection pane they create toggles and guided stories; choose carefully which properties each bookmark captures.
Buttons trigger page navigation, bookmarks, drill-through or Q&A. The page and bookmark navigator visuals build menus that update automatically as pages are added.
A Service experience for ad hoc analysis of a semantic model or visual in a lightweight matrix-and-chart editor, without editing the report itself.
A small report page set as a tooltip and shown on hover, adding context such as a trend line for the hovered category.
Selecting a point in one visual filters or highlights the others on the page. Edit interactions to control which visuals respond and whether they filter or highlight.
AI-assisted and analytical visuals that answer "why" and "what drives this" questions or compare many series at once. They are powerful but need clean, well-modelled data to give trustworthy results.
Breaks a measure down across dimensions in any order the user picks, with optional AI splits that choose the highest or lowest next level.
Runs statistical analysis to rank which factors most change an outcome, such as low ratings or churn. Treat results as hints worth investigating, not proof of causation.
Repeats one chart per category in a grid with shared axes, making comparisons across regions or products easier than one crowded chart.
Lets users type questions in natural language and get a chart back. Quality depends on table and column names and the synonyms you teach it in the Q&A setup.
Publishing uploads a report and its semantic model to a workspace in the Service. From there you choose how people get it: direct shares, workspace access, apps or embedded links — each with different licensing and governance implications.
Containers for reports, semantic models, dashboards and other items, with shared access. Use one per team or subject area, and separate development from production.
Publish from Desktop to a workspace, which creates or replaces a report and semantic model. Then configure data source credentials, gateway and scheduled refresh in the model settings.
Reports are multi-page, interactive and built in Desktop; dashboards are single-page canvases of tiles pinned from many reports in the Service. Dashboards are less used now that reports and apps cover most needs.
Direct sharing grants access to one item; links can target people in the org or specific users. Both sides need a Pro or PPU licence unless the content sits on a capacity.
A packaged, read-only bundle of a workspace's reports with navigation and audiences. The recommended way to distribute content to large groups of consumers.
Pixel-perfect, printable reports built in Power BI Report Builder, ideal for invoices and long tables that run across pages. They use the RDL format inherited from SQL Server Reporting Services.
Keeping published data fresh: connecting the cloud Service to on-premises sources and scheduling refreshes within capacity limits. Refresh failures are the most common Power BI support issue, so learn to read refresh history.
A Windows service installed inside your network that relays queries between the Service and on-premises databases or files. Run it in standard mode on an always-on machine, clustered for high availability.
Scheduled refresh runs up to 8 times a day on shared capacity and up to 48 on Premium. Automatic page refresh with change detection re-queries DirectQuery visuals only when a measure's value changes.
Working on reports as a team and keeping stakeholders informed: comments, shared workspaces, notifications and scheduled deliveries. Good collaboration habits avoid the classic "which copy is the right one" problem.
Subscriptions email a snapshot of a report page or dashboard on a schedule; data alerts notify you when a card, KPI or gauge tile crosses a threshold.
Who can see which content and which data. Workspace roles control what people can do with items; row- and object-level security, defined in the semantic model, control which data viewers see inside a report.
Roles with DAX filters on tables, such as [Region] = "West" or dynamic rules using USERPRINCIPALNAME(). Assign members in the Service and test with View as role; RLS does not restrict workspace Admins, Members or Contributors.
Hides whole tables or columns from certain roles, so visuals that reference them break for those users. Defined with external tools such as Tabular Editor or in Desktop's role editor.
Admin, Member, Contributor and Viewer, from full control down to read-only. Give consumers Viewer or an app audience, not Contributor.
Organisation-wide controls that keep data trustworthy and protected: classification, leak prevention, admin settings, auditing and endorsement. Mostly the job of Power BI or Fabric admins, but authors should know what applies to their content.
Microsoft Purview labels such as Confidential applied to reports and models; they travel with exports to Excel, PowerPoint and PDF and can enforce encryption.
Microsoft Purview policies that inspect semantic models when they refresh, detect sensitive data types like card or passport numbers, and respond with policy tips, admin alerts or restrictions.
Admin portal switches controlling who can publish to web, export, share externally, use custom visuals or create workspaces. Scope features to security groups rather than enabling them for everyone.
Activity events such as views, exports and shares, available in the Purview audit log or through the admin activity events API for usage reporting and investigations.
Endorsement marks a semantic model as Promoted or Certified so others reuse the trusted one instead of building copies. Certification is restricted to people the admin authorises.
Treat reports like software: develop, test and promote changes through environments, and automate the repetitive steps. Power BI projects (.pbip) with Git integration make changes reviewable.
Low-code flows that trigger refreshes, export reports or react to data alerts, and a Power Automate visual that lets report users run a flow with the current selection.
Promote content from development to test to production workspaces, with deployment rules that swap data sources or parameters per stage. Requires Premium, PPU or Fabric capacity.
Power BI connects outwards too: automate it through APIs, embed reports in your own apps, analyse models in Excel, run Python or R, and work across the wider Fabric platform.
Programmatic control of workspaces, reports, refreshes, users and admin scans, authenticated with Microsoft Entra ID. Service principals let CI pipelines call it without a user account.
Embeds reports in your own application with the JavaScript client. "Embed for your customers" uses app-owns-data with a capacity; "embed for your organisation" uses each user's own login.
Analyze in Excel creates a live PivotTable over a published semantic model, keeping one set of measures. Excel files can also be imported or pinned from OneDrive.
Run Python or R scripts as a Power Query source or step, and draw custom charts with script visuals. In the Service these need supported packages, and script sources require a personal gateway.
Microsoft's unified analytics platform that now hosts Power BI alongside lakehouses, warehouses, notebooks and pipelines, all sharing OneLake storage and capacity-based licensing.