Power BI for Data Analysis
Microsoft Power BI for data visualization, analysis, and business intelligence.
Table of Contents
- Introduction & Data Analyst Foundation
- Introduction to Power BI
- Get Started with Power BI
- Understanding the Power BI Interface
- Data Preparation (Power Query Mastery)
- Power Query
- Advanced Data Transformation and Integration
- Data Modeling and DAX Essentials
- DAX (Data Analysis Expressions)
- Advanced DAX and Data Modeling
- Power BI Visualizations
- Power BI Filtering and Interactivity
- Management, Security, and Microsoft Fabric
- Power BI Services
- Power BI Architecture
- Power BI AI Integration
- Best Practices
- Resources
Introduction & Data Analyst Foundation
Discover Data Analysis
Roles in Data:
- Data Analyst: Analyze data to find insights and trends
- Data Scientist: Build predictive models and advanced analytics
- Data Engineer: Build and maintain data pipelines
- Business Analyst: Bridge business and technical teams
- BI Developer: Create reports and dashboards
Tasks of a Data Analyst: The data analyst workflow follows these steps:
- Prepare → Clean and transform data (Power Query)
- Model → Create relationships and data model (Power Pivot)
- Visualize → Create charts and reports (Power View)
- Analyze → Build calculations and insights (DAX)
- Manage → Share and maintain reports (Power BI Service)
Workflow Table:
| Step | Tool Used | Purpose |
|---|---|---|
| Prepare | Power Query | Clean, transform, and shape data |
| Model | Power Pivot | Create relationships and data model |
| Visualize | Power View | Create interactive visualizations |
| Analyze | DAX | Build calculations and measures |
| Share | Power BI Service | Publish and share reports |
Power BI Ecosystem Overview
Power BI Desktop:
- Free desktop application
- Create reports and data models
- Author reports locally
- Publish to Power BI Service
Power BI Service:
- Cloud-based platform
- Share and collaborate on reports
- Create dashboards
- Schedule data refreshes
- Mobile access
Power BI Mobile:
- iOS, Android, Windows apps
- View reports on mobile devices
- Offline access
- Push notifications
Power BI Report Server:
- On-premises solution
- Self-hosted reporting
- For organizations requiring on-premises deployment
Data Analyst Workflow & Use Cases in Business
Common Use Cases:
- Sales Analysis: Track sales performance, identify trends
- Financial Reporting: Budget vs. actual, financial KPIs
- Operations: Monitor operational metrics, efficiency
- Marketing: Campaign performance, customer analytics
- HR Analytics: Employee metrics, attrition analysis
Workflow Example:
- Connect to sales database
- Transform data (clean, merge, calculate)
- Model relationships (Products, Customers, Dates)
- Visualize sales trends and KPIs
- Analyze with DAX measures
- Share dashboard with stakeholders
Power BI Building Blocks
Core Concepts:
Datasets:
- Collection of data tables
- Created in Power BI Desktop
- Published to Power BI Service
- Can be refreshed and shared
Reports:
- Collection of visualizations
- Built on datasets
- Interactive and filterable
- Multiple pages
Dashboards:
- Single-page view
- Pinned visuals from reports
- Real-time updates
- Mobile-optimized
Workspaces:
- Collaboration spaces
- Organize reports and dashboards
- Manage permissions
- Publish apps
Semantic Models vs Visual Layers
Semantic Model (Data Layer):
- Data tables and relationships
- Measures and calculated columns
- Hierarchies and metadata
- Foundation for all reports
Visual Layer:
- Visualizations built on semantic model
- Report pages and layouts
- Formatting and interactivity
- User-facing interface
Key Concept: One semantic model can support multiple reports and dashboards.
Power BI Roles in Microsoft Fabric Ecosystem
Microsoft Fabric: Unified analytics platform integrating Power BI with other services.
Power BI in Fabric:
- Data Engineering: Data pipelines and transformation
- Data Science: Machine learning and analytics
- Data Warehousing: Centralized data storage
- Real-Time Analytics: Streaming data
- Data Activator: Automated actions
Roles:
- Fabric Administrator: Manage Fabric resources
- Power BI Administrator: Manage Power BI tenant
- Report Creator: Build reports and dashboards
- Report Consumer: View and interact with reports
Introduction to Power BI
What is Power BI?
Power BI is a business analytics service by Microsoft that provides interactive visualizations and business intelligence capabilities with an interface simple enough for end users to create their own reports and dashboards.
Key Features:
- Data Connectivity: Connect to 100+ data sources
- Data Transformation: Clean and transform data with Power Query
- Data Modeling: Create relationships and calculated columns
- Visualizations: 50+ visualization types
- DAX Formulas: Advanced calculations and measures
- Sharing and Collaboration: Share reports via Power BI Service
- Mobile Access: View reports on mobile devices
Power BI Components
- Power BI Desktop: Free desktop application for creating reports
- Power BI Service: Cloud-based service for sharing and collaboration
- Power BI Mobile: Mobile apps for iOS, Android, Windows
- Power BI Report Server: On-premises reporting solution
When to Use Power BI
Use Power BI when:
- You need to create interactive dashboards
- You want to share reports with non-technical users
- You need to connect to multiple data sources
- You require real-time data updates
- You want to publish reports online
Alternatives:
- Tableau: More advanced, higher cost
- Python/Plotly: More flexible, requires coding
- Excel: Simpler, less powerful
Get Started with Power BI
Installation, Setup, and Interface Overview
Installation:
- Download Power BI Desktop from powerbi.microsoft.com
- Run installer
- Sign in with Microsoft account (optional, for publishing)
Initial Setup:
- File → Options and Settings → Options
- Configure:
- Regional Settings: Date/time formats
- Privacy: Data source privacy levels
- DirectQuery: Query timeout settings
- R Scripting: R installation path (if using R)
Interface Overview:
- Ribbon: Home, Insert, Modeling, View tabs
- Fields Pane: All tables and columns
- Visualizations Pane: Chart types
- Filters Pane: Apply filters
- Canvas: Build visualizations
- Views: Report, Data, Model views
Connecting Data Sources
Supported Data Sources:
- Excel:
.xlsx,.xlsmfiles - CSV: Comma-separated values
- Web: Web pages, APIs
- SQL: SQL Server, Azure SQL, MySQL, PostgreSQL
- SharePoint: SharePoint lists
- JSON: JSON files and APIs
- PDF: Extract tables from PDFs
- Databases: Oracle, Teradata, SAP, etc.
- Cloud Services: Azure, Google Analytics, Salesforce
Steps to Connect:
- Home → Get Data
- Select data source
- Enter connection details
- Select tables/queries
- Transform Data or Load
Example - Excel:
Get Data → Excel → Select file → Choose sheets → Load
Example - SQL Server:
Get Data → SQL Server → Enter server → Select database → Choose tables → Load
Basic Transformations in Power Query
Common Transformations:
Remove Rows:
- Home → Remove Rows
- Remove Top/Bottom/Blank/Duplicates
Split Columns:
- Transform → Split Column
- By Delimiter, By Number of Characters, By Positions
Fill Down:
- Transform → Fill → Down
- Fill missing values from row above
Data Types:
- Transform → Data Type
- Text, Whole Number, Decimal, Date, etc.
Rename Columns:
- Right-click column → Rename
- Or: Transform → Rename
Detect Data Type Errors:
- Power Query automatically detects type mismatches
- Click error indicator to fix
Semantic Models vs Visual Layers
Semantic Model (Backend):
- Data tables and relationships
- Measures and calculated columns
- Hierarchies
- Data model structure
Visual Layer (Frontend):
- Report pages
- Visualizations
- Formatting
- User interactions
Best Practice: Build robust semantic model first, then create visualizations.
Understanding Power BI Building Blocks
Datasets:
- Collection of data tables
- Created when you import data
- Can be refreshed
- Shared across reports
Reports:
- Built on datasets
- Multiple pages
- Interactive visualizations
- Published to service
Dashboards:
- Single-page view
- Pinned visuals
- Real-time updates
- Mobile-friendly
Workspaces:
- Collaboration spaces
- Organize content
- Manage permissions
- Publish apps
Understanding the Power BI Interface
Power BI Desktop Layout
Main Areas:
- Ribbon: Contains tabs (Home, Insert, Modeling, View)
- Fields Pane: Lists all tables and fields from your data
- Visualizations Pane: Choose visualization types
- Filters Pane: Apply filters to visuals and pages
- Canvas: Where you build your visualizations
- Report View: Main view for creating reports
- Data View: View and edit data tables
- Model View: Manage relationships between tables
Getting Started
Step 1: Import Data
Home Tab → Get Data → Choose data source
Step 2: Transform Data
Home Tab → Transform Data → Power Query Editor opens
Step 3: Create Visualizations
Drag fields from Fields pane to Canvas
Select visualization type from Visualizations pane
Step 4: Format Visuals
Use Format pane to customize colors, fonts, titles
Power BI Visualizations
Basic Visualizations
1. Bar Chart
Use for: Comparing categories
How to Create:
- Select Bar Chart from Visualizations
- Drag category to Axis
- Drag measure to Values
Example:
- Axis: Product Category
- Values: Total Sales
2. Line Chart
Use for: Showing trends over time
How to Create:
- Select Line Chart
- Drag date to Axis
- Drag measure to Values
Example:
- Axis: Date (Month)
- Values: Sales Amount
3. Pie Chart
Use for: Showing proportions
How to Create:
- Select Pie Chart
- Drag category to Legend
- Drag measure to Values
Example:
- Legend: Region
- Values: Total Revenue
4. Scatter Chart
Use for: Showing relationships between two measures
How to Create:
- Select Scatter Chart
- Drag measure to X Axis
- Drag measure to Y Axis
- Optionally add Size and Legend
Example:
- X Axis: Marketing Spend
- Y Axis: Sales Revenue
- Size: Number of Customers
5. Table
Use for: Showing detailed data
How to Create:
- Select Table
- Drag fields to Values
Example:
- Values: Product Name, Quantity, Price, Total
6. Matrix
Use for: Pivot table-like analysis
How to Create:
- Select Matrix
- Drag fields to Rows
- Drag fields to Columns
- Drag measures to Values
Example:
- Rows: Product Category
- Columns: Year
- Values: Total Sales
Advanced Visualizations
7. Map Visualizations
- Map: Basic geographic visualization
- Filled Map: Choropleth maps
- Shape Map: Custom geographic shapes
Use for: Geographic analysis
8. Gauge
Use for: Showing progress toward a goal
Example:
- Value: Current Sales
- Target: Sales Goal
- Maximum: 100%
9. KPI
Use for: Key Performance Indicators
Example:
- Value: Current Month Sales
- Target: Previous Month Sales
- Status Indicator: Shows if target met
10. Waterfall Chart
Use for: Showing cumulative effect of positive and negative values
Example:
- Category: Month
- Y Axis: Net Change
- Breakdown: Revenue, Costs, Profit
Core Visuals
Bar Chart:
- Compare categories
- Horizontal bars
- Axis: Category, Values: Measure
Column Chart:
- Compare categories
- Vertical columns
- Axis: Category, Values: Measure
Line Chart:
- Show trends over time
- Axis: Date, Values: Measure
- Multiple series with Legend
Pie/Donut Chart:
- Show proportions
- Legend: Category, Values: Measure
- Donut allows center text
Scatter Chart:
- Show relationships
- X Axis: Measure, Y Axis: Measure
- Size and Legend optional
Card & Multi-row Card:
- Display single values
- KPI display
- Multi-row: Multiple values
Table & Matrix:
- Detailed data display
- Table: Simple list
- Matrix: Pivot-like with rows/columns
Advanced Visuals
Waterfall Chart:
- Show cumulative effect
- Category: Steps, Y Axis: Change
- Breakdown: Positive/negative values
Map (Filled):
- Geographic visualization
- Location: Geographic field
- Color saturation: Measure
Tree Map:
- Hierarchical data
- Category: Hierarchy
- Size: Measure, Color: Measure
Gauge:
- Progress toward goal
- Value: Current, Target: Goal
- Minimum/Maximum: Range
KPI:
- Key Performance Indicator
- Value: Current measure
- Target: Target measure
- Trend: Time period
Funnel:
- Process stages
- Category: Stages
- Values: Measure
Conditional Formatting and Custom Tooltips
Conditional Formatting: Apply formatting based on values.
Types:
- Background Color: Color scale
- Font Color: Color scale
- Data Bars: In-cell bars
- Icons: Icon sets
Steps:
- Select visual
- Format visual → Conditional formatting
- Choose field
- Configure rules
Custom Tooltips: Enhanced tooltips with additional visuals.
Steps:
- Create tooltip page
- Build small visual
- Format page → Tooltip
- Assign to visual
Use Cases:
- Show additional context
- Display related metrics
- Provide drill-down preview
Custom Visualizations
Power BI supports custom visuals from the marketplace:
- Chiclet Slicer: Enhanced filtering
- Infographic Designer: Custom infographics
- Synoptic Panel: Custom geographic maps
- Word Cloud: Text analysis visualization
How to Add:
Visualizations pane → Get more visuals → Import from marketplace
Power BI Filtering and Interactivity
Types of Filters
1. Visual-Level Filters
Apply to a single visualization
How to Use:
- Select a visual
- Go to Filters pane
- Expand the visual name
- Add filters to fields
Example:
- Filter: Product Category = "Electronics"
- Only shows data for Electronics category
2. Page-Level Filters
Apply to all visuals on a page
How to Use:
- Go to Filters pane
- Expand "Filters on this page"
- Add filters
Example:
- Filter: Year = 2023
- All visuals on page show only 2023 data
3. Report-Level Filters
Apply to all pages in the report
How to Use:
- Go to Filters pane
- Expand "Filters on all pages"
- Add filters
Example:
- Filter: Region = "North America"
- Entire report filtered to North America
4. Slicers
Interactive filters that users can control
How to Create:
- Select Slicer from Visualizations
- Drag field to Field
Types of Slicers:
- Dropdown: Dropdown menu
- List: List of values
- Between: Range slider
- Relative Date: Date range selector
Example:
// Slicer for Date Range
// Users can select start and end dates
Cross-Filtering and Cross-Highlighting
Cross-Filtering: Selecting a data point filters other visuals Cross-Highlighting: Selecting a data point highlights related data
How to Configure:
- Select a visual
- Format pane → Edit interactions
- Choose: Filter, Highlight, or None
Design Power BI Report
Power BI Report Structure:
- Pages: Multiple report pages
- Visuals: Charts, tables, cards
- Filters: Visual, page, report level
- Slicers: Interactive filters
- Bookmarks: Saved states
- Buttons: Navigation and actions
Report Objects:
- Text Boxes: Add text and formatting
- Shapes: Decorative elements
- Images: Logos, pictures
- Buttons: Navigation, actions
- Page Background: Colors, images
Select Appropriate Visual Type:
- Comparison: Bar, Column charts
- Trends: Line, Area charts
- Proportions: Pie, Donut charts
- Relationships: Scatter charts
- Geographic: Map visuals
- KPIs: Card, KPI visuals
- Details: Table, Matrix
Format and Configure Visualizations:
- Format Pane: Colors, fonts, titles
- Analytics Pane: Trendlines, forecasts
- Fields Pane: Data fields
- Visualizations Pane: Chart types
Interactive Features:
- Cross-filtering: Click to filter
- Cross-highlighting: Click to highlight
- Drill-down: Expand hierarchies
- Tooltips: Hover for details
Enhance Reports for User Experience
Report Navigation:
- Buttons: Create navigation buttons
- Bookmarks: Save and navigate to states
- Drill-through: Link to detail pages
- Hyperlinks: Link to external resources
Filtering:
- Slicers: Visual filters
- Sync Slicers: Across pages
- Visual-level Filters: Per visual
- Page-level Filters: Per page
- Report-level Filters: Entire report
Report Elements:
- Text Boxes: Instructions, descriptions
- Shapes: Visual separators
- Images: Branding, icons
- Background: Page styling
Bookmarks: Save current state of report.
Steps:
- View → Bookmarks pane
- Set up report state
- Add bookmark
- Use button to navigate
Use Cases:
- Storytelling
- Navigation
- Show/hide visuals
- Reset filters
Drill Through: Navigate to detail page with context.
Steps:
- Create detail page
- Set up drill-through fields
- Right-click visual → Drill through
- Configure fields
Example:
- Click "Sales by Region" → Drill to "Sales by City" with region filter
Hierarchies & Drill Down: Enable drill-down in visuals.
Steps:
- Create hierarchy
- Add to visual
- Enable drill-down
- Users can expand/collapse
Bookmarks & Buttons: Create interactive navigation.
Steps:
- Create bookmarks
- Insert → Button
- Assign bookmark to button
- Style button
Dynamic Filters with Slicers: Interactive filtering experience.
Slicer Types:
- Dropdown: Compact
- List: Full list
- Between: Range
- Relative Date: Date range
Sync Slicers:
- View → Sync Slicers
- Select slicers to sync
- Choose pages to sync
Report Themes & Color Palettes: Consistent styling.
Steps:
- View → Themes → Customize theme
- Set colors, fonts
- Apply to report
Color Palettes:
- Default: Power BI colors
- Custom: Define own colors
- Accessible: Colorblind-friendly
Drill-Through
Allow users to drill into details from summary data
How to Set Up:
- Create detail page
- Right-click on visual → Drill through
- Configure drill-through fields
Example:
- Click on "Sales by Region" → Drill to "Sales by City"
Choose When to Use Paginated Reports
Paginated Reports: Pixel-perfect reports for printing/PDF.
When to Use:
- Printing: Need exact layout
- PDF Export: Fixed format
- Large Datasets: Thousands of rows
- Regulatory: Compliance reports
- Formal Reports: Financial statements
Power BI Reports vs Paginated Reports:
- Power BI Reports: Interactive, visual
- Paginated Reports: Fixed format, detailed
DAX (Data Analysis Expressions)
Introduction to DAX
DAX is a formula language used in Power BI, Power Pivot, and Analysis Services. It's similar to Excel formulas but designed for data modeling.
DAX Syntax
MeasureName = FUNCTION(Table[Column], [Filter1], [Filter2])
Basic DAX Functions
1. Aggregation Functions
SUM:
Total Sales = SUM(Sales[Amount])
AVERAGE:
Average Sales = AVERAGE(Sales[Amount])
COUNT:
Total Orders = COUNT(Sales[OrderID])
COUNTROWS:
Number of Products = COUNTROWS(Products)
MIN/MAX:
Min Sales = MIN(Sales[Amount])
Max Sales = MAX(Sales[Amount])
2. Filter Functions
CALCULATE: Modify filter context
Sales 2023 = CALCULATE(SUM(Sales[Amount]), Sales[Year] = 2023)
FILTER: Filter a table
High Value Sales =
CALCULATE(
SUM(Sales[Amount]),
FILTER(Sales, Sales[Amount] > 1000)
)
ALL: Remove filters
Total Sales All Time =
CALCULATE(SUM(Sales[Amount]), ALL(Sales))
3. Time Intelligence Functions
TOTALYTD: Year-to-date total
Sales YTD = TOTALYTD(SUM(Sales[Amount]), 'Date'[Date])
SAMEPERIODLASTYEAR: Compare to previous year
Sales PY =
CALCULATE(
SUM(Sales[Amount]),
SAMEPERIODLASTYEAR('Date'[Date])
)
DATEDIFF: Calculate difference between dates
Days Since Order =
DATEDIFF(Orders[OrderDate], TODAY(), DAY)
4. Text Functions
CONCATENATE: Combine text
Full Name = CONCATENATE(Customers[FirstName], " ", Customers[LastName])
LEFT/RIGHT: Extract characters
First 3 Chars = LEFT(Products[ProductCode], 3)
UPPER/LOWER: Change case
Upper Name = UPPER(Customers[Name])
5. Logical Functions
IF: Conditional logic
Sales Category =
IF(
SUM(Sales[Amount]) > 10000,
"High",
"Low"
)
SWITCH: Multiple conditions
Priority Level =
SWITCH(
TRUE(),
Orders[Amount] > 1000, "High",
Orders[Amount] > 500, "Medium",
"Low"
)
Add Measures to Semantic Models
Calculated Measures: Aggregations computed on-the-fly.
Steps:
- Modeling → New Measure
- Enter DAX formula
- Name the measure
Example:
Total Sales = SUM(Sales[Amount])
Average Sales = AVERAGE(Sales[Amount])
Calculated Columns: Row-level calculations stored in memory.
Steps:
- Modeling → New Column
- Enter DAX formula
Example:
Full Name = Customers[FirstName] & " " & Customers[LastName]
Profit = Sales[Revenue] - Sales[Cost]
Calculated Tables: New tables created with DAX.
Steps:
- Modeling → New Table
- Enter DAX formula
Example:
Sales Summary =
SUMMARIZE(
Sales,
Sales[ProductID],
"Total Sales", SUM(Sales[Amount])
)
Row Context vs Filter Context
Row Context: Context of current row (for calculated columns).
// Calculated Column (Row Context)
Profit = Sales[Revenue] - Sales[Cost]
// Evaluates for each row
Filter Context: Filters applied to calculation (for measures).
// Measure (Filter Context)
Total Sales = SUM(Sales[Amount])
// Respects filters from visuals, slicers, etc.
Understanding Context:
- Row Context: "For this row, calculate..."
- Filter Context: "Given these filters, calculate..."
- CALCULATE: Modifies filter context
Dynamic Titles, KPIs, Variance %
Dynamic Titles: Titles that change based on selections.
// Measure for dynamic title
Title =
"Sales by " & SELECTEDVALUE(Products[Category], "All Categories")
KPIs: Key Performance Indicators with targets.
Steps:
- Create measure for value
- Create measure for target
- Use KPI visual
- Set status thresholds
Example:
Sales KPI = SUM(Sales[Amount])
Sales Target = 100000
// Status
Sales Status =
IF(
[Sales KPI] >= [Sales Target],
"On Target",
"Below Target"
)
Variance %: Calculate percentage difference.
Sales Variance % =
VAR CurrentSales = SUM(Sales[Amount])
VAR PreviousSales =
CALCULATE(
SUM(Sales[Amount]),
SAMEPERIODLASTYEAR(Date[Date])
)
RETURN
DIVIDE(
CurrentSales - PreviousSales,
PreviousSales,
0
)
Optimize Model Performance
Use Variables (VAR, RETURN): Improve performance and readability.
// Without VAR (calculates twice)
Total Sales =
IF(
SUM(Sales[Amount]) > 1000,
SUM(Sales[Amount]) * 0.1,
SUM(Sales[Amount]) * 0.05
)
// With VAR (calculates once)
Total Sales =
VAR TotalAmount = SUM(Sales[Amount])
RETURN
IF(
TotalAmount > 1000,
TotalAmount * 0.1,
TotalAmount * 0.05
)
Performance Tips:
- Use measures instead of calculated columns when possible
- Use VAR to avoid multiple calculations
- Filter early in CALCULATE
- Review relationship cardinality
- Use aggregations for large datasets
- Monitor with Performance Analyzer
Create Visual Calculations
Visual Calculations: Calculations defined at visual level (Power BI 2024+).
Understanding Visual Calculations:
- Defined within visual
- Context-aware
- Different from measures
- Can reference other visual calculations
Creating Visual Calculations:
- Select visual
- Analytics pane → Visual calculations
- Add calculation
- Use DAX-like syntax
Example:
Running Total = RUNNINGSUM([Sales])
Previous Period = PREVIOUS([Sales])
Use Cases:
- Running totals
- Period comparisons
- Rankings within visual
- Percent of total
Parameters in Visual Calculations: Use parameters for flexibility.
Case Study: Financial Dashboard using DAX
Components:
- Revenue measures (Total, YTD, Previous Year)
- Expense measures
- Profit measures
- Variance calculations
- KPI indicators
- Dynamic titles
- Time intelligence functions
Calculated Columns vs Measures
Calculated Columns:
- Computed for each row
- Stored in memory
- Use for row-level calculations
Example:
// Calculated Column
Full Name = Customers[FirstName] & " " & Customers[LastName]
Measures:
- Computed on-the-fly
- Context-aware
- Use for aggregations
Example:
// Measure
Total Sales = SUM(Sales[Amount])
Data Modeling and DAX Essentials
Design a Semantic Model
Understanding Relational Data Modeling:
Relational Model:
- Tables connected by relationships
- Normalized structure
- Efficient storage
- Flexible queries
Key Concepts:
- Primary Key: Unique identifier in dimension table
- Foreign Key: Reference to primary key in fact table
- Relationship: Connection between tables
- Cardinality: One-to-many, many-to-many, one-to-one
Star Schema vs Snowflake Schema Design
Star Schema: Simplified structure with fact table and dimension tables.
Structure:
Advantages:
- Simple and intuitive
- Fast queries
- Easy to understand
- Power BI optimized
Snowflake Schema: Normalized dimensions with sub-dimensions.
Structure:
When to Use:
- Complex hierarchies
- Normalized data sources
- Reduce redundancy
Best Practice: Prefer Star Schema for Power BI.
Managing Relationships
Relationship Types:
One-to-Many (1:Many):
- Most common
- One dimension → Many fact records
- Example: One Product → Many Sales
Many-to-Many:
- Requires bridge table
- Example: Students ↔ Courses
- Use with caution (performance impact)
One-to-One:
- Rare
- Usually combine tables instead
Creating Relationships:
- Model View
- Drag from one table to another
- Configure properties:
- Cardinality: One-to-many, Many-to-one, etc.
- Cross Filter Direction: Single or Both
- Make This Relationship Active: Check/uncheck
Cardinality & Cross Filter Direction
Cardinality: Defines relationship type.
Options:
- Many-to-One: Fact → Dimension (most common)
- One-to-Many: Dimension → Fact
- One-to-One: Rare
- Many-to-Many: Requires bridge table
Cross Filter Direction: Controls how filters flow.
Single:
- Filters flow one direction
- Fact → Dimension (default)
- Better performance
Both:
- Filters flow both directions
- Use when needed
- Can impact performance
Example:
Sales → Product (Many-to-One, Single)
Sales → Date (Many-to-One, Single)
Role of Primary & Foreign Keys
Primary Key (PK):
- Unique identifier in dimension table
- One per table
- Used for relationships
- Example: ProductID in DimProduct
Foreign Key (FK):
- Reference to primary key
- In fact table
- Links to dimension
- Example: ProductID in FactSales
Best Practices:
- Always have primary keys
- Use integer keys (faster)
- Avoid composite keys if possible
- Name consistently (ID suffix)
Building Hierarchies
Date Hierarchy:
Date Hierarchy
├── Year
├── Quarter
├── Month
└── Day
Product Hierarchy:
Product Hierarchy
├── Category
├── Subcategory
└── Product
Geography Hierarchy:
Geography Hierarchy
├── Country
├── Region
├── State
└── City
Creating Hierarchies:
- Model View
- Right-click table → New Hierarchy
- Drag columns into hierarchy
- Reorder as needed
Use Cases:
- Enable drill-down
- Organize related columns
- Improve user experience
Handling Inactive Relationships
Inactive Relationships: Multiple relationships between same tables.
Example:
- FactSales has OrderDate and ShipDate
- Both relate to DimDate
- Only one can be active
Using USERELATIONSHIP:
Sales by Ship Date =
CALCULATE(
SUM(Sales[Amount]),
USERELATIONSHIP(Sales[ShipDate], Date[Date])
)
Best Practice: Use inactive relationships for different date perspectives.
Project: Build a Complete Power Pivot Model
Steps:
- Import fact table (Sales)
- Import dimension tables (Product, Customer, Date)
- Create relationships
- Set up hierarchies
- Create measures
- Build visualizations
Advanced DAX and Data Modeling
Advanced DAX Patterns
1. Running Totals
Running Total =
CALCULATE(
SUM(Sales[Amount]),
FILTER(
ALL('Date'[Date]),
'Date'[Date] <= MAX('Date'[Date])
)
)
2. Percentage of Total
% of Total Sales =
DIVIDE(
SUM(Sales[Amount]),
CALCULATE(SUM(Sales[Amount]), ALL(Sales))
)
3. Moving Averages
Moving Average 7 Days =
AVERAGEX(
DATESINPERIOD('Date'[Date], MAX('Date'[Date]), -7, DAY),
CALCULATE(SUM(Sales[Amount]))
)
4. Rank Functions
Sales Rank =
RANKX(
ALL(Products),
CALCULATE(SUM(Sales[Amount]))
)
Data Modeling Best Practices
1. Star Schema Design
- Fact Table: Contains measures (Sales, Orders)
- Dimension Tables: Contains attributes (Products, Customers, Date)
Example:
FactSales
├── ProductID (FK)
├── CustomerID (FK)
├── DateID (FK)
├── SalesAmount (Measure)
└── Quantity (Measure)
DimProduct
├── ProductID (PK)
├── ProductName
└── Category
DimCustomer
├── CustomerID (PK)
├── CustomerName
└── Region
DimDate
├── DateID (PK)
├── Date
├── Year
└── Month
2. Relationships
- One-to-Many: Most common (DimProduct → FactSales)
- Many-to-Many: Use bridge tables
- One-to-One: Rare, usually combine tables
How to Create:
- Model View
- Drag from one table to another
- Configure relationship properties
3. Hierarchies
Create drill-down paths
Example:
Date Hierarchy
├── Year
├── Quarter
├── Month
└── Day
4. Calculated Tables
Create new tables using DAX
Example:
// Calculated Table
Sales Summary =
SUMMARIZE(
Sales,
Sales[ProductID],
"Total Sales", SUM(Sales[Amount]),
"Order Count", COUNT(Sales[OrderID])
)
Data Preparation (Power Query Mastery)
Get Data. Storage Modes
Storage Mode Options:
Import:
- Data loaded into Power BI
- Fast performance
- Works offline
- Limited by memory
DirectQuery:
- Live connection to source
- No data stored in Power BI
- Real-time data
- Slower performance
Dual:
- Can use Import or DirectQuery
- Power BI chooses automatically
- Best of both worlds
DirectLake (Fabric):
- Direct connection to OneLake
- No data movement
- Fast performance
- Microsoft Fabric feature
When to Use:
- Import: Small to medium datasets, fast reports
- DirectQuery: Large datasets, real-time requirements
- Dual: Flexible scenarios
- DirectLake: Microsoft Fabric environments
Data Profiling
Column Profiling:
- View → Column Profile
- Shows data distribution
- Identifies nulls, errors, unique values
- Helps understand data quality
Column Quality:
- View → Column Quality
- Shows valid, error, empty percentages
- Quick data quality check
Column Distribution:
- View → Column Distribution
- Shows value frequency
- Identifies patterns
Resolve Inconsistencies and Data Quality Issues
Common Issues:
- Inconsistent Formats: Dates, numbers, text
- Unexpected Values: Outliers, typos
- Null Values: Missing data
- Duplicates: Repeated records
- Data Type Errors: Wrong types assigned
Solutions:
- Change Data Type: Transform → Data Type
- Replace Values: Transform → Replace Values
- Remove Duplicates: Home → Remove Duplicates
- Fill Down/Up: Transform → Fill
- Conditional Columns: Add Column → Conditional Column
Data Shape Transformations
Column Operations:
- Add Column: Custom, Conditional, Index
- Remove Columns: Home → Remove Columns
- Rename: Transform → Rename
- Move: Drag and drop
- Split: Transform → Split Column
- Merge: Transform → Merge Columns
Table Operations:
- Transpose: Transform → Transpose
- Pivot: Transform → Pivot Column
- Unpivot: Transform → Unpivot Columns
- Group By: Transform → Group By
User-Friendly Naming Conventions
Best Practices:
- Use clear, descriptive names
- Remove spaces (use underscores or CamelCase)
- Avoid special characters
- Use consistent naming
- Remove prefixes/suffixes
Example:
Bad: "Sales_Data_2024_Final_v2"
Good: "Sales2024"
Bad: "Customer Name"
Good: "CustomerName" or "Customer_Name"
Merge Queries vs Append Queries
Merge Queries: Combine data horizontally (like SQL JOIN).
Steps:
- Home → Merge Queries
- Select two tables
- Choose join type (Inner, Left, Right, Full Outer)
- Select matching columns
- Expand merged columns
Use Cases:
- Combine Customer with Orders
- Add lookup data
- Enrich datasets
Append Queries: Stack tables vertically (like SQL UNION).
Steps:
- Home → Append Queries
- Select tables to append
- Choose "Two tables" or "Three or more tables"
Use Cases:
- Combine monthly data
- Stack similar datasets
- Consolidate multiple sources
Conditional Columns and Custom Columns
Conditional Columns: Add column based on conditions.
Steps:
- Add Column → Conditional Column
- Define conditions
- Set output values
Example:
If [Sales] > 1000 then "High"
Else if [Sales] > 500 then "Medium"
Else "Low"
Custom Columns: Add column using M language.
Steps:
- Add Column → Custom Column
- Enter M formula
- Name the column
Example:
// M Language
[FirstName] & " " & [LastName]
Group By and Aggregate
Group By: Aggregate data by groups.
Steps:
- Transform → Group By
- Select grouping column(s)
- Choose aggregation (Sum, Average, Count, etc.)
- Select column to aggregate
Example:
- Group by: Product Category
- Operation: Sum
- Column: Sales Amount
Pivot & Unpivot Columns
Pivot Column: Transform rows to columns.
Steps:
- Transform → Pivot Column
- Select value column
- Select attribute column
- Choose aggregation
Unpivot Columns: Transform columns to rows.
Steps:
- Transform → Unpivot Columns
- Select columns to unpivot
- Creates Attribute and Value columns
Handling Errors & Nulls like a Pro
Error Handling:
- Remove Errors: Home → Remove Rows → Remove Errors
- Replace Errors: Transform → Replace Values → Replace Errors
- Keep Errors: For analysis
Null Handling:
- Remove Nulls: Home → Remove Rows → Remove Blank Rows
- Replace Nulls: Transform → Replace Values
- Fill Down/Up: Transform → Fill
- Conditional Logic: Use conditional columns
Best Practices:
- Understand why nulls exist
- Don't remove without analysis
- Document handling decisions
Parameters & Functions in Power Query
Parameters: Reusable values in queries.
Create Parameter:
- Manage Parameters → New Parameter
- Define name, type, value
- Use in queries:
#"Parameter Name"
Example:
Parameter: StartDate
Type: Date
Value: 2024-01-01
Use in filter: [Date] >= #"StartDate"
Functions: Reusable M code.
Create Function:
- Create query with parameters
- Right-click → Create Function
- Define parameters
- Use in other queries
Example:
// Function: CleanText
(text as text) =>
Text.Trim(Text.Clean(text))
Dynamic Source Switching (Folder + File Parameterization)
Folder Parameterization: Load all files from folder.
Steps:
- Get Data → Folder
- Select folder
- Combine files
- Power Query creates function
File Parameterization: Switch between files dynamically.
Steps:
- Create parameter for file path
- Use parameter in source
- Change parameter to switch files
Example:
// Parameter: FilePath
// Source
Excel.Workbook(File.Contents(#"FilePath"))
Creating Date Table using M Language
M Language Date Table:
let
StartDate = #date(2020, 1, 1),
EndDate = #date(2024, 12, 31),
NumberOfDays = Duration.Days(EndDate - StartDate),
DateList = List.Dates(StartDate, NumberOfDays + 1, #duration(1, 0, 0, 0)),
DateTable = Table.FromList(DateList, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
RenamedColumns = Table.RenameColumns(DateTable, {{"Column1", "Date"}}),
ChangedType = Table.TransformColumnTypes(RenamedColumns, {{"Date", type date}}),
InsertYear = Table.AddColumn(ChangedType, "Year", each Date.Year([Date]), Int64.Type),
InsertM "Month", each Date.Month([Date]), Int64.Type),
InsertDay = Table.AddColumn(InsertMonth, "Day", each Date.Day([Date]), Int64.Type),
InsertQuarter = Table.AddColumn(InsertDay, "Quarter", each Date.QuarterOfYear([Date]), Int64.Type),
InsertWeekday = Table.AddColumn(InsertQuarter, "Weekday", each Date.DayOfWeek([Date]), Int64.Type),
InsertWeekNumber = Table.AddColumn(InsertWeekday, "WeekNumber", each Date.WeekOfYear([Date]), Int64.Type)
in
InsertWeekNumber
Or Use DAX:
// Calculated Table
DateTable =
CALENDAR(DATE(2020,1,1), DATE(2024,12,31))
Query Diagnostics (Performance Optimization)
Enable Diagnostics:
- View → Query Diagnostics → Start Diagnostics
- Run query
- View → Query Diagnostics → Stop Diagnostics
Analyze Results:
- Duration: Time for each step
- CPU Time: Processing time
- Data Volume: Rows processed
- Memory: Memory usage
Optimization Tips:
- Remove unnecessary steps
- Filter early (reduce data volume)
- Use appropriate data types
- Avoid calculated columns in queries
- Use aggregations when possible
Case Study: Sales Data Cleaning + Auto Refresh Setup
Scenario: Clean messy sales data and set up automatic refresh.
Steps:
- Connect to Excel file
- Remove header rows
- Split product codes
- Clean customer names
- Fix date formats
- Remove duplicates
- Create date table
- Set up parameters for file path
- Configure refresh schedule in Power BI Service
Power Query
Introduction to Power Query
Power Query is the data transformation engine in Power BI. It's used to connect, combine, and refine data from multiple sources.
Power Query Editor Interface
Main Areas:
- Query Pane: List of queries
- Data Preview: Preview of transformed data
- Ribbon: Transformation commands
- Formula Bar: M language formulas
- Applied Steps: History of transformations
Common Transformations
1. Remove Columns
Home → Remove Columns
2. Rename Columns
Transform → Rename
3. Change Data Types
Transform → Data Type
4. Remove Rows
Home → Remove Rows
- Remove Top Rows
- Remove Bottom Rows
- Remove Alternate Rows
- Remove Blank Rows
- Remove Duplicates
5. Split Columns
Transform → Split Column
- By Delimiter
- By Number of Characters
- By Positions
6. Add Columns
Add Column → Custom Column
Example:
// M Language Formula
[FirstName] & " " & [LastName]
7. Group By
Transform → Group By
Example:
- Group by: Product Category
- Operation: Sum
- Column: Sales Amount
8. Pivot/Unpivot
Transform → Pivot Column
Transform → Unpivot Columns
Advanced Power Query
1. Merge Queries
Combine data from multiple tables
How to Use:
- Home → Merge Queries
- Select two tables
- Choose join type (Inner, Left, Right, Full Outer)
- Select matching columns
Example:
- Merge Customers with Orders
- Join on CustomerID
- Left Join (keep all customers)
2. Append Queries
Stack tables vertically
How to Use:
- Home → Append Queries
- Select tables to append
Example:
- Append 2021 Sales with 2022 Sales
3. Parameters
Create reusable parameters
How to Create:
- Manage Parameters → New Parameter
- Define name, type, and value
Example:
- Parameter: StartDate
- Type: Date
- Value: 2023-01-01
4. Custom Functions
Create reusable M functions
Example:
// Custom Function: Clean Text
(text as text) =>
Text.Trim(Text.Clean(text))
Advanced Data Transformation and Integration
Data Source Integration
1. SQL Server
Get Data → SQL Server
- Enter server name
- Enter database name
- Choose authentication method
2. Excel Files
Get Data → Excel
- Select file
- Choose sheets to import
3. CSV Files
Get Data → Text/CSV
- Select file
- Configure delimiter
4. Web Data
Get Data → Web
- Enter URL
- Power Query extracts tables
5. APIs
Get Data → Web
- Enter API endpoint
- Configure authentication
Incremental Refresh
Load only new or changed data
How to Set Up:
- Model → Manage Relationships
- Configure incremental refresh policy
- Define date range
Example:
- Refresh last 30 days of data
- Keep 2 years of historical data
Data Refresh
Scheduled Refresh:
- Power BI Service
- Dataset Settings
- Schedule Refresh
- Set frequency and time
Manual Refresh:
Home → Refresh
Management, Security, and Microsoft Fabric
Create and Manage Workspaces
Create Workspace:
- Power BI Service
- Workspaces → Create workspace
- Enter name and description
- Choose workspace type
Workspace Types:
- My Workspace: Personal
- Workspace: Team collaboration
- Premium Workspace: Advanced features
Manage Permissions:
- Workspace → Access
- Add users/groups
- Assign roles:
- Admin: Full control
- Member: Contribute
- Contributor: Add content
- Viewer: View only
Workspace Items:
- Reports: Power BI reports
- Dashboards: Pinned visuals
- Datasets: Data models
- Dataflows: ETL processes
- Apps: Packaged content
Share and Distribute Reports:
- Share: Direct sharing
- Publish App: Package and distribute
- Embed: Embed in websites
- Export: PDF, PowerPoint
Implement Row Level Security (RLS)
RLS (Static Method): Define rules for specific users.
Steps:
- Power BI Desktop → Modeling → Manage Roles
- Create role
- Define DAX filter
- Assign users to role
Example:
// Role: Regional Manager
[Region] = "North America"
RLS (Dynamic Method): Use user information in filters.
Steps:
- Create role
- Use USERPRINCIPALNAME() or USERNAME()
- Match to data
Example:
// Dynamic RLS
[SalespersonEmail] = USERPRINCIPALNAME()
Testing RLS:
- Modeling → View As
- Select role
- Test report view
Manage Semantic Models
Connect to On-premises Data Sources:
- Install Power BI Gateway
- Configure gateway
- Add data source
- Use in Power BI Service
Keep Data Up to Date using Incremental Refresh: Load only new/changed data.
Steps:
- Configure incremental refresh policy
- Define date range
- Set refresh frequency
- Historical data range
Example:
- Refresh last 30 days
- Keep 2 years of history
Semantic Model Endorsement: Promote quality datasets.
Levels:
- Promoted: Recommended
- Certified: Verified quality
- None: Default
Data Protection & Report Settings:
- Sensitivity Labels: Classify data
- Export Restrictions: Limit exports
- Print Restrictions: Disable printing
- Copy Restrictions: Prevent copying
Leverage Usage Metrics Reports: Track report usage.
Steps:
- Workspace → Usage metrics
- View report usage
- Identify popular reports
- Optimize based on usage
Create Dashboards
Create Power BI Dashboards:
- Power BI Service
- Workspace → New → Dashboard
- Name dashboard
- Pin visuals
Pin Live Report Pages:
- Open report
- Pin visual or page
- Choose dashboard
- Visual updates automatically
Add Theme to Visuals:
- Dashboard → Edit
- Format → Theme
- Choose theme
- Apply to dashboard
Set Mobile View:
- Dashboard → Edit
- Mobile layout
- Arrange tiles for mobile
- Optimize for small screens
Explore Copilot
Understand Semantic Model Requirements:
- Semantic model must be in Power BI Service
- Requires Copilot license
- Model must be endorsed (Promoted or Certified)
Create Visuals and Reports using Copilot:
- Power BI Service
- Create → Copilot
- Describe what you want
- Copilot generates report
Example Prompts:
- "Create a sales dashboard"
- "Show revenue by region"
- "Compare this year to last year"
Create Summaries using Copilot:
- Select report
- Ask Copilot to summarize
- Review AI-generated summary
- Refine if needed
Explore End-to-End Analytics with Microsoft Fabric
Describe End-to-End Analytics in Microsoft Fabric: Unified platform for analytics.
Components:
- OneLake: Unified data lake
- Data Engineering: ETL pipelines
- Data Science: ML and analytics
- Data Warehousing: Centralized storage
- Real-Time Analytics: Streaming
- Power BI: Visualization
Understand Data Teams and Roles:
- Data Engineers: Build pipelines
- Data Scientists: Build models
- Data Analysts: Create reports
- Business Users: Consume insights
Describe How to Enable and Use Fabric:
- Enable Fabric in tenant
- Create Fabric workspace
- Use Fabric services
- Integrate with Power BI
Fabric Integration:
- DirectLake: Direct connection to OneLake
- Dataflows Gen2: Enhanced ETL
- Semantic Models: Enhanced modeling
- Real-Time: Streaming analytics
Power BI Services
Power BI Service Overview
Power BI Service is the cloud-based platform for sharing and collaborating on Power BI reports.
Key Features
1. Workspaces
Organize reports and dashboards
Types:
- My Workspace: Personal workspace
- App Workspaces: Team collaboration
2. Dashboards
Single-page view of multiple visuals
How to Create:
- Pin visuals from reports
- Arrange on dashboard
- Add tiles and widgets
3. Apps
Packaged collections of dashboards and reports
How to Publish:
- Workspace → Create App
- Configure settings
- Publish to organization
4. Sharing
Share reports with users
Methods:
- Share: Direct sharing
- Publish to Web: Public link (be careful!)
- Embed: Embed in websites/apps
Row-Level Security (RLS)
Restrict data access based on user roles
How to Set Up:
- Model → Manage Roles
- Create role
- Define DAX filter
Example:
// RLS Filter: Users see only their region
[Region] = USERPRINCIPALNAME()
Power BI Architecture
Architecture Components
- Data Sources: SQL, Excel, APIs, etc.
- Power BI Desktop: Authoring tool
- Power BI Gateway: On-premises data gateway
- Power BI Service: Cloud platform
- Power BI Mobile: Mobile apps
Data Flow
Deployment Options
1. Cloud-Only
- Data sources in cloud
- Direct connection
- No gateway needed
2. Hybrid
- Some data on-premises
- Use Power BI Gateway
- Scheduled refresh
3. On-Premises
- Power BI Report Server
- All data on-premises
- Self-hosted
Power BI AI Integration
AI-Powered Features
1. Quick Insights
Automatically find insights in data
How to Use:
- Select a visual
- Click "Get Insights"
- Power BI suggests insights
2. Q&A (Natural Language)
Ask questions in plain English
Example Questions:
- "What were total sales last month?"
- "Show me top 10 products by revenue"
- "Compare sales by region"
3. Key Influencers
Identify factors that influence metrics
How to Use:
- Visualizations → Key Influencers
- Select metric to analyze
- Select fields to analyze
Example:
- Analyze: Customer Churn
- Influencers: Age, Region, Product Category
4. Decomposition Tree
Break down metrics to find root causes
How to Use:
- Visualizations → Decomposition Tree
- Select metric
- Drill down by dimensions
5. Anomaly Detection
Automatically detect outliers
How to Use:
- Select time series visual
- Enable anomaly detection
- Power BI highlights anomalies
AI Visuals
Key Influencers: Identify factors that influence metrics.
Steps:
- Visualizations → Key Influencers
- Select metric to analyze
- Select fields to analyze
- Review influencers
Example:
- Analyze: Customer Churn
- Influencers: Age, Region, Product Category
Smart Narratives: AI-generated text insights.
Steps:
- Visualizations → Smart Narrative
- Select measures
- AI generates insights
- Customize text
Decomposition Tree: Break down metrics to find root causes.
Steps:
- Visualizations → Decomposition Tree
- Select metric
- Drill down by dimensions
- Identify contributors
Q&A Visual: Natural language querying.
Steps:
- Visualizations → Q&A
- Type question in plain English
- Power BI creates visual
- Refine question
Example Questions:
- "What were total sales last month?"
- "Show me top 10 products by revenue"
- "Compare sales by region"
Integration with Copilot & AI Formula Builder: AI-powered assistance.
Copilot Features:
- Generate DAX formulas
- Suggest visualizations
- Create reports
- Answer questions
AI Formula Builder:
- Natural language to DAX
- Formula suggestions
- Error explanations
Performance & Advanced Analytics
Use the Analyze Feature: Quick insights on visuals.
Steps:
- Select visual
- Analytics pane → Analyze
- Choose analysis type
- Review insights
Group, Bin, and Cluster Data: Organize data for analysis.
Grouping:
- Right-click field → New Group
- Define groups manually
- Or use binning
Binning:
- Right-click numeric field → New Group
- Set bin size
- Creates ranges
Clustering:
- Analytics pane → Find clusters
- Power BI groups similar data
- Review clusters
Identify Patterns and Trends:
- Trendlines: Analytics pane → Trendline
- Forecasts: Analytics pane → Forecast
- Anomaly Detection: Analytics pane → Anomaly Detection
Integrate Power BI with Python & R: Use data science languages.
Python Integration:
- Get Data → Python script
- Write Python code
- Use pandas, matplotlib, etc.
- Return DataFrame
Example:
import pandas as pd
import matplotlib.pyplot as plt
# Access Power BI data
df = dataset
# Perform analysis
result = df.groupby('Category')['Sales'].sum()
# Return to Power BI
result
R Integration:
- Get Data → R script
- Write R code
- Use R packages
- Return data frame
Use What-If Parameters & Scenario Simulation: Model different scenarios.
Steps:
- Modeling → New Parameter
- Define parameter range
- Create measure using parameter
- Use slicer to adjust
Example:
// Parameter: DiscountRate (0% to 50%)
Adjusted Sales =
SUM(Sales[Amount]) * (1 - DiscountRate[DiscountRate Value])
Perform Forecasting & Trendline Analysis: Predict future values.
Forecasting:
- Select time series visual
- Analytics pane → Forecast
- Configure settings
- Review forecast
Trendline:
- Select visual
- Analytics pane → Trendline
- Choose type (Linear, Polynomial, etc.)
- Display equation/R²
Azure AI Integration
1. Azure Machine Learning
Use ML models in Power BI
How to Use:
- Get Data → Azure Machine Learning
- Select model
- Use in reports
2. Cognitive Services
Use AI services for text/image analysis
Example:
- Sentiment Analysis
- Image Recognition
- Text Translation
Best Practices
Design Best Practices
- Use Consistent Colors: Create theme
- Limit Visuals per Page: 3-5 visuals max
- Use Appropriate Chart Types: Match data to visualization
- Add Context: Titles, descriptions, tooltips
- Optimize Performance: Limit data, use aggregations
DAX Best Practices
- Use Measures, Not Calculated Columns: For aggregations
- Avoid Nested IFs: Use SWITCH instead
- Use Variables: Improve readability
- Optimize CALCULATE: Minimize filter modifications
- Test Performance: Use DAX Studio
Data Modeling Best Practices
- Star Schema: Fact and dimension tables
- Proper Relationships: One-to-many preferred
- Hide Unnecessary Columns: Clean field list
- Use Hierarchies: Enable drill-down
- Optimize Data Types: Use appropriate types
Security Best Practices
- Row-Level Security: Implement RLS
- Limit Sharing: Only share with authorized users
- Avoid Publish to Web: For sensitive data
- Use Workspaces: Organize by team/project
- Audit Logs: Monitor access
Resources
Official Documentation
Free Courses
Communities
Books
- "The Definitive Guide to DAX" by Marco Russo and Alberto Ferrari
- "Beginning Power BI" by Dan Clark
- "Pro Power BI Architecture" by Phil Seamark
Try next: Build one dashboard with three visuals and one DAX measure. Show it to someone who will use it.