Master Power BI From Scratch

Learn Power BI fundamentals, data sources, data transformation, data modeling, DAX, visualizations, reports, and dashboards through structured practical lessons.

COURSE SYLLABUS
1. Power BI Introduction
Introduction to Power BI Power BI Desktop and Service Power BI Workflow Power BI Terminology Power BI Workspace Overview
2. Power BI Installation and Interface
Power BI Installation Power BI Desktop Interface Report, Data and Model Views Power BI File Management Power BI Settings and Options
3. Power BI Data Sources
Excel and CSV Data Sources Text and Folder Data Sources Database Data Sources Web and Online Data Sources Data Source Credentials and Refresh
4. Power BI Data Transformation
Power Query Introduction Data Types and Column Operations Merge and Append Queries Split, Group and Pivot Columns Power Query Applied Steps
5. Power BI Data Cleaning
Missing and Null Values Remove Duplicates and Errors Text and Date Cleaning Replace and Fill Values Data Quality Validation
6. Power BI Data Modeling
Data Modeling Fundamentals Create Table Relationships Cardinality and Filter Direction Star Schema and Dimension Tables Date Tables and Model Optimization
7. DAX
DAX Introduction and Syntax DAX Aggregation Functions DAX Logical and Conditional Functions DAX Filter and Iterator Functions DAX Date and Time Intelligence
8. Power BI Calculations
Calculated Columns Measures and Implicit Measures Row Context and Filter Context Quick Measures and KPI Time-Based Business Calculations
9. Power BI Visualizations
Basic Power BI Charts Pie, Donut and Treemap Charts Cards, Tables and Matrices Maps and Geographic Visuals Advanced and Custom Visuals
10. Power BI Filters and Slicers
Filter Types and Filter Pane Slicers and Sync Slicers Drill Down and Drill Through Cross-Filtering and Highlighting Bookmarks and Buttons
11. Power BI Reports and Dashboards
Report Page Layout and Design Multi-Page Reports Dashboard Creation and Tiles Executive and Business Reports Report Usability and Accessibility
12. Power BI Formatting and Interactivity
Themes and Color Formatting Conditional Formatting Tooltips and Report Page Tooltips Visual Interactions and Edit Interactions Mobile Layout and Responsive Reports
13. Power BI Publishing and Sharing
Publish Reports to Service Workspaces and Apps Scheduled Refresh and Gateway Sharing and Permissions Row-Level Security and Deployment
14. Power BI Projects and Assessment
Sales Dashboard Project Student Performance Project Data Cleaning and Modeling Assignment DAX and Visualization Assessment Final Power BI Project and Assessment

Row Level Security and Deployment

Row Level Security (RLS) controls which rows of data a user can see in a Power BI semantic model. Deployment is the process of moving approved reporting content through development, testing, and production environments. Together, these practices help organizations protect business data and release reports in a controlled, reliable manner.

Learning Objectives

  • Understand the purpose of Row Level Security.
  • Differentiate static RLS from dynamic RLS.
  • Create basic security roles in Power BI Desktop.
  • Test security roles before publishing.
  • Understand development, test, and production environments.
  • Follow a deployment checklist for reliable report releases.

1. What Is Row Level Security?

Row Level Security restricts the rows returned to a user according to defined security rules. For example, a company may want each regional manager to see sales for their own region while the national manager can see sales for all regions.

RLS applies security filters to data in the semantic model. It does not simply hide a visual or remove a report page. The security rule determines which rows are available to the user when the model is queried.

All Sales Data Region | Sales North | 120,000 South | 95,000 East | 80,000 West | 110,000 RLS Security Filter User's permitted region only Filter Rows Before Display Regional Manager North Region 120,000 sales Other regions are filtered out The user sees only rows permitted by the security rule.

2. Static Row Level Security

Static RLS uses a predefined filter for each role. For example, one role can filter the Region column to North, while another role filters it to South. The role assigned to the user determines which filter applies.

Example Sales Table

Region Salesperson Sales Amount
North Samadhan 120,000
South Pradnya 95,000
East Samiksha 80,000
West Omkar 110,000

If a role has the filter [Region] = "North", a user assigned to that role sees only the rows that satisfy that condition.

Creating a Static RLS Role

  1. Open the report in Power BI Desktop.
  2. Select the Modeling tab.
  3. Choose Manage roles.
  4. Create a new role, such as NorthRegion.
  5. Select the relevant table and define the filter expression.
  6. Save the role definition.
  7. Use View as to test the role before publishing.
Sales Table NorthRegion Role [Region] = "North" Only North rows are allowed SouthRegion Role [Region] = "South" Only South rows are allowed Each role uses a fixed region filter.

3. Dynamic Row Level Security

Dynamic RLS uses information about the current user to determine which rows they can access. Instead of creating a separate role for every region or employee, a model can use a user-to-region mapping table and the current user's identity.

A common approach uses USERPRINCIPALNAME() to identify the signed-in user and a relationship between a security mapping table and the business data.

Example Security Mapping Table

User Email Region
north.manager@ciit.example North
south.manager@ciit.example South
east.manager@ciit.example East
west.manager@ciit.example West

The email addresses above are illustrative examples. Replace them with the correct identities in your authorized environment.

Example DAX Filter Expression

Suppose the table is named UserRegionAccess and contains UserEmail and Region columns. A role filter can match the current user to the mapping table:

UserRegionAccess[UserEmail] = USERPRINCIPALNAME()

This expression filters the mapping table to the current user. For the rule to filter the intended business data, configure the relationships and security-filter propagation correctly. Test the complete model; the expression alone does not guarantee that every related table is secured as intended.

Signed-in User User principal name manager@company.com Access Mapping User to Region relationship Sales Data Permitted region rows only Dynamic Security Rule Match current identity to the access mapping table Relationships and role testing are essential.

4. Static RLS vs. Dynamic RLS

Feature Static RLS Dynamic RLS
Security logic Uses predefined filters for individual roles. Uses the current user identity and access mapping.
Role management May require several roles for different groups. Can support many users through a shared role and mapping table.
Maintenance Role definitions may need updates as access requirements change. Mapping data can be updated as users or assignments change.
Best suited for A small number of stable security groups. Scenarios where access varies by user or organizational assignment.

5. Testing RLS Before Publishing

RLS must be tested before the report is released. Incorrect relationships, missing mapping rows, unexpected user identities, or overly broad filters can expose data that should remain restricted.

Testing Checklist

  1. Open the model in Power BI Desktop.
  2. Use Modeling and select Manage roles to review the rules.
  3. Use View as to test each role.
  4. Check the rows returned in tables and the values shown in visuals.
  5. Test users who should have access to different regions.
  6. Check what happens when a user has no matching mapping row.
  7. Validate relationships and security-filter propagation.
  8. Publish to a test workspace and verify role assignments in the service.
Important: RLS behavior depends on how the user accesses the semantic model and on their permissions. Workspace roles such as Admin, Member, and Contributor are not equivalent to ordinary report consumer access for RLS testing. Test with an appropriate consumer account and verify the actual published configuration.

6. Assigning RLS Users in Power BI Service

After publishing a model that contains RLS roles, users or groups must be assigned to the appropriate roles in Power BI Service where required. Defining a role in Power BI Desktop does not by itself assign every user to that role in the service.

General Assignment Workflow

  1. Publish the report and semantic model to the intended workspace.
  2. Open the semantic model's security or role-management settings.
  3. Select the appropriate RLS role.
  4. Add the intended users or supported groups.
  5. Save the role assignments.
  6. Test with an authorized consumer account.
  7. Confirm that the user sees only the rows permitted by the role.

7. What Is Power BI Deployment?

Deployment is the controlled process of moving reporting content from development through testing and into production. The goal is to verify changes before they reach business users and reduce the risk of publishing broken reports or incorrect security configurations.

Development Build reports Create measures Configure security Authoring environment Test Validate totals Test RLS roles Check refresh Quality assurance Production Release approved content Confirm permissions Monitor refresh Business environment Test content and security before releasing it to production.

8. Deployment Environments

Environment Purpose Typical Activities
Development Build and modify reporting solutions. Create visuals, measures, relationships, and security rules.
Test Validate the solution before release. Check calculations, RLS behavior, data connections, and refresh.
Production Provide approved reports to business users. Monitor report availability, refresh status, permissions, and changes.

Power BI deployment pipelines can support movement between development, test, and production stages when available and configured for the organization's environment. Other teams may use controlled workspace publishing processes. In either case, validate data connections and security assignments after deployment.

9. Deployment Checklist

Before Release

  • Verify report calculations and business totals.
  • Confirm that report pages, slicers, and navigation work correctly.
  • Test RLS roles and user-to-region mappings.
  • Check data source credentials and gateway settings.
  • Verify refresh schedule and refresh history.
  • Review workspace permissions and app audiences.
  • Confirm that production data sources are configured correctly.
  • Document the release version and important changes.

After Release

  • Open the deployed report and verify key visuals.
  • Confirm that intended users can access the content.
  • Test security using appropriate consumer accounts.
  • Check the first refresh after deployment.
  • Monitor user feedback and resolve any release issues.

10. Common RLS and Deployment Problems

Problem Possible Cause Suggested Solution
A user sees rows from several regions. The role filter or relationship configuration may be incorrect. Review the role expression, relationships, and security propagation.
A user sees no data. No mapping row exists, the identity does not match, or the filter is too restrictive. Verify the signed-in identity, mapping table, and role assignment.
RLS works in Desktop but not as expected online. Service role assignments or the user's access path may differ. Review service role assignments and test using a consumer account.
A deployment introduces incorrect values. Model changes, data-source configuration, or parameters may differ between environments. Compare environment settings and validate key measures and data.
Users cannot open the production report. Permissions or app access may not have been configured correctly. Review production workspace access, app audience, and applicable licensing.
Refresh fails after deployment. Credentials, gateway mapping, or source configuration may be missing. Verify the production connection settings and run a test refresh.

11. Practical Exercise

Task: Secure and Deploy a Regional Sales Report

Use a practice dataset and test accounts that you are authorized to manage. Do not use confidential production data for this exercise.

  1. Create a sales table containing Region, Salesperson, and Sales Amount.
  2. Create a static RLS role for the North region.
  3. Use View as to verify that the role filters the data correctly.
  4. If appropriate, create a user-region mapping table for dynamic RLS.
  5. Test the dynamic rule with different user identities.
  6. Publish the report to a development or test workspace.
  7. Assign the intended users to the relevant roles in the service.
  8. Verify report access, model permissions, and refresh settings.
  9. Move the approved content through your available deployment process.
  10. Verify the deployed report and security behavior after release.

Expected outcome: A regional sales report that displays only permitted rows and follows a documented deployment and validation process.

12. Knowledge Check

Question 1: What does Row Level Security control?

A. The font size of a report

B. Which rows of data a user can access

C. The number of report pages

D. The color of every visual

Question 2: Which function is commonly used in dynamic RLS to identify the current user?

A. SUM()

B. COUNTROWS()

C. USERPRINCIPALNAME()

D. FORMAT()

Question 3: What is the main purpose of a test environment?

A. To skip validation

B. To give every user administrator access

C. To remove all security rules

D. To validate content before production release

Question 4: Does creating an RLS role in Desktop automatically assign all service users to it?

A. Yes, always

B. No, service role assignments may also be required

C. Only on weekends

D. Only when a report has one page

Show Answers
  1. B — RLS controls which rows a user can access.
  2. C — USERPRINCIPALNAME() can identify the current user.
  3. D — The test environment is used to validate content before release.
  4. B — Assign users or supported groups to the appropriate roles in the service where required.

Summary

Row Level Security restricts which rows users can see in a Power BI semantic model. Static RLS uses predefined role filters, while dynamic RLS can use the current user's identity and an access mapping table. Correct relationships, role assignments, and testing are essential for reliable data protection.

Deployment moves approved reporting content through development, testing, and production environments. Before release, validate calculations, report interactions, RLS behavior, credentials, gateway settings, refresh configuration, and user permissions.

After deployment, confirm that reports work correctly and that users see only the data they are authorized to access. A structured release process and regular security reviews help keep Power BI reports accurate, secure, and reliable.