Power BI Reporting Dashboard for FMCG-DW
Build a Power BI report with DAX measures, drillthrough, and row-level security.
Introduction
30 Second Summary
Every business collects data, but raw numbers sitting in a database don't help anyone make decisions. A reporting dashboard turns those numbers into visual stories that answer real questions like "which country is growing fastest?" and "which customer drives the most revenue?"
In this project, you will build a multi-page Power BI report connected to your BalticDW data warehouse. You will write DAX measures for year-over-year revenue comparisons, build interactive drillthrough navigation, and implement row-level security so each country manager sees only their own data.
What You'll Build
You will open your finished report, click a country slicer, and watch every chart and metric recalculate instantly to show that country's revenue trends, growth percentage, and customer breakdown.
By the end of this project, you'll have:
- A live Power BI report with five DAX measures that transform raw totals into business insights including year-over-year growth and percentage-of-total revenue, all recalculating dynamically as you interact with slicers.
- A customer drillthrough page you can trigger by right-clicking any customer name in a chart, instantly showing their complete order history and revenue contribution.
- Three row-level security roles that restrict each Baltic country manager to only their subsidiary's data, validated using View as Role inside Power BI Desktop.
- Secret Mission: Build a product category performance matrix with conditional formatting and a month-over-month growth DAX measure for instant visual pattern recognition.
Are there any prerequisites?
This project requires a completed Project 2 (dbt Transformation Layer) with the BalticDW database populated on SQL Server 2025, including the dbt_dev.stg_sales_orders view and dbo.DimDate table. You will install Power BI Desktop in Step 1.
Before We Start
Before we dive in, let's lock in what you're about to build and why it matters for your data platform.
Install Power BI Desktop and Connect to BalticDW
Your BalticDW data warehouse has 156 rows of cross-border sales data sitting in SQL Server. The data is there, but nobody can explore it visually or ask analytical questions of it yet.
Power BI Desktop is a free reporting tool from Microsoft that connects directly to SQL Server. In this step, you will install it, pull your warehouse tables into Power BI, and wire up the relationship between them.
In this step, get ready to:
- Install Power BI Desktop from the Microsoft Store.
- Connect to your BalticDW database and import two tables.
- Create a relationship between DimDate and stg_sales_orders.
Install Power BI Desktop
Power BI Desktop is a free Windows application that you install from the Microsoft Store. It updates monthly, and only the latest version is supported.
- Press the Windows key to open your search bar.
- Type Power BI Desktop and look at the results.
✔️ I see Power BI Desktop in my results
- Click to open Power BI Desktop.
- Once it opens, click the Help ribbon tab at the top.
- Click About and check the Version line.
- Confirm the version shows a 2026 release (such as July 2026 or later).
- Close the About dialog.
If your version is current, skip ahead to the sign-in prompt instructions below the tabs.
ⓧ I see an older version
If your installed version predates 2026, you need to update it. The Microsoft Store handles updates automatically for Store-installed apps.
- Press the Windows key and type Microsoft Store. Press Enter to open it.
- In the Store, click the Library icon in the bottom-left sidebar.
- Click Get updates to check for available updates.
- If Power BI Desktop appears in the update list, click Update next to it.
- Once the update completes, open Power BI Desktop again.
If Power BI Desktop does not appear in the Store library (you installed it from the Download Center instead), uninstall it from Settings > Apps > Installed apps, then follow the instructions in the "Not installed" tab to get the Store version.
ⓧ Not installed
Install Power BI Desktop from the Microsoft Store. No admin privileges are required for a Store install.
- Press the Windows key and type Microsoft Store. Press Enter to open it.
- In the Microsoft Store search bar, type Power BI Desktop.
- Click the Power BI Desktop result published by Microsoft Corporation.
- Click Install (or Get). Wait for the download and installation to complete.
- Once installed, click Open to launch Power BI Desktop.
When Power BI Desktop launches for the first time, it shows a sign-in dialog. You do not need a Power BI account for this project.
- Close the sign-in prompt by clicking the X in the top-right corner of the dialog (or click Maybe later if that option appears).
You should now see the Power BI Desktop start screen with a blank canvas.
Power BI Desktop won't install?
- Make sure you are running Windows 10 or later. Power BI Desktop does not run on macOS or Linux.
- If the Microsoft Store shows an error, restart your computer and try again. Store installs require an active internet connection.
- help me troubleshoot my Power BI Desktop installation
Connect to your BalticDW database
Your SQL Server instance already has the BalticDW database with your dbt-transformed views. You will now import two tables into Power BI using Import mode, which loads the data into Power BI's in-memory engine for fast visual rendering.
- On the Home ribbon, click Get Data.
- In the Get Data dialog, select SQL Server database.
- Click Connect.
A connection settings dialog appears asking for your server and database details.
- In the Server field, type localhost.
- In the Database field, type BalticDW.
- Under Data Connectivity mode, confirm Import is selected (this is the default).
- Click OK.
Why Import mode?
Import mode loads a snapshot of your data into Power BI's in-memory engine. This gives you the richest DAX feature set and the fastest visuals.
With only 156 rows in stg_sales_orders, there is no reason to use DirectQuery (which adds network latency on every interaction). Import mode also unlocks all time intelligence functions you will write in the next step.
The Navigator window opens, showing the tables and views available in BalticDW.
- Expand the BalticDW node in the Navigator.
- Check the box next to dbt_dev.stg_sales_orders.
- Check the box next to dbo.DimDate.
- Click Load.
Power BI imports both tables. After loading completes, you should see stg_sales_orders and DimDate listed in the Data pane on the right side of the screen.
Don't see the tables in Navigator?
- Verify SQL Server is running. Open Services (press the Windows key, type Services) and confirm SQL Server (MSSQLSERVER) shows a status of Running.
- Double-check you typed localhost as the server and BalticDW as the database. Spelling must be exact.
- help me connect Power BI Desktop to my local SQL Server
Create the date relationship
For time intelligence DAX functions to work later, Power BI needs to know which column in your fact table maps to which column in your date table. You will create a one-to-many relationship between DimDate and stg_sales_orders.
- Switch to Model view by clicking the Model icon in the left sidebar (it looks like three connected boxes).
You should see two table boxes on the canvas: stg_sales_orders and DimDate.
- In the stg_sales_orders table box, find the order_date field.
- Click and drag order_date onto full_date in the DimDate table box.
Before you release, think about what kind of relationship Power BI will create. Each date appears once in DimDate but can appear on many order rows. What does that tell you about the cardinality?
A relationship line now connects the two tables. DimDate shows a 1 (one side) and stg_sales_orders shows a * (many side). This one-to-many relationship is exactly what you need.
What does this relationship do?
The relationship tells Power BI that every row in stg_sales_orders links to exactly one calendar date in DimDate. This is a classic star schema pattern: one dimension table (DimDate) connected to one fact table (stg_sales_orders).
Without this relationship, time intelligence functions like SAMEPERIODLASTYEAR would not know which date column to traverse.
- Save your file by pressing Ctrl+S.
- In the Save dialog, navigate to your Desktop.
- Name the file BalticDW_Report.pbix and click Save.
The title bar now shows BalticDW_Report, confirming the file is saved.
No relationship line appearing?
- Make sure you dragged from order_date in stg_sales_orders onto full_date in DimDate. Both columns must be DATE type for the relationship to form.
- If Power BI auto-created a relationship to a different column, double-click the relationship line to edit it. Change the columns to order_date and full_date.
- help me create a relationship between DimDate and stg_sales_orders in Power BI
Your data warehouse is now flowing into Power BI. You have two tables loaded and linked by a proper relationship. Next up, you will build your first report page and discover the gap that only DAX measures can fill.
Build Your First Report Page
Your data model is connected and ready. Two tables, one relationship, and 156 rows of Baltic distribution data are sitting in Power BI.
A CEO reviewing Baltic operations wants answers: which country drives the most revenue? How do monthly trends compare to the same period last year? In this step, you'll build two core visuals to tackle these questions.
In this step, get ready to:
- Build a bar chart showing revenue by country.
- Add a line chart tracking monthly revenue trends.
- Answer whether this month outperforms the same month last year.
Create a revenue-by-country bar chart
Power BI's Report view is where visuals live. You drag fields from your data model onto the canvas and Power BI picks a chart type automatically.
- Switch to Report view by clicking the top icon in the left sidebar (it looks like a chart on a page).
- In the Data pane on the right, expand the stg_sales_orders table.
- Drag subsidiary_country onto the empty canvas.
- Drag line_total onto the same visual that just appeared.
A bar chart appears showing three bars: Estonia, Latvia, and Lithuania, each with their total revenue.
What just happened?
Power BI detected that you dragged a text field (country names) and a numeric field (revenue). It auto-selected a bar chart as the best visual to compare categories.
Behind the scenes, Power BI ran a SUM aggregation on line_total grouped by subsidiary_country. All 156 rows are summarized into three totals.
Seeing a table instead of a bar chart?
If Power BI created a table visual instead of a bar chart, click the visual to select it. Then in the Visualizations pane, click the Clustered bar chart icon to switch it.
Help me switch my visual type in Power BI.
Add a monthly revenue line chart
The bar chart answers which country earns the most. A line chart answers how revenue changes over time.
- Click an empty area on the canvas to deselect your bar chart.
- In the Visualizations pane, click the Line chart icon (a line with data points).
- From the Data pane, drag order_date to the X-axis well.
- Drag line_total to the Y-axis well.
A line chart appears showing monthly revenue from 2024 through 2025. Power BI automatically groups your dates by month.
Why did the dates group by month?
Power BI detects that order_date is a Date column and automatically creates a date hierarchy (Year > Quarter > Month > Day). The X-axis defaults to showing months, which is the most useful granularity for trend analysis.
- Save your file by pressing Ctrl+S.
Line chart showing a flat line or single point?
If your X-axis shows only "Year" with one or two data points, click the down-arrow icon on the X-axis of your line chart visual. This drills down into the month level. You can also right-click the X-axis and select Expand all down one level in the hierarchy.
Help me get my line chart to show monthly data points.
Try to compare this year against last year
You have two charts that answer "how much" and "when." Now try to answer the more analytical question: how does each month compare to the same month last year?
Before you try, predict: do you think you can add a second line showing last year's revenue using only drag-and-drop from the Data pane?
- Look through the fields in your Data pane.
- Try to find a field that represents "last year's revenue" or "year-over-year change."
- Try to find a way to overlay a prior-year comparison line on your line chart using only drag-and-drop.
You cannot. No field in your data model represents "last year's revenue" because that concept does not exist as a stored column. It is a calculation that shifts the current date context back 12 months. The same applies to "YoY growth %" and "percentage of total country revenue."
Why can't drag-and-drop solve this?
Drag-and-drop visuals summarize fields that already exist in your tables. They can SUM, COUNT, or AVERAGE a column. But "revenue for the same period last year" is not a column. It requires a formula that understands dates, shifts time, and recalculates dynamically as filters change.
This is the gap that DAX measures fill. DAX (Data Analysis Expressions) is Power BI's formula language for creating calculations that do not exist as stored data.
You have two working visuals and a clear understanding of where drag-and-drop stops. In the next step, you'll mark your Date table and write five DAX measures that unlock year-over-year comparisons and percentage-of-total calculations.
Build the Semantic Model and DAX Measures
Your bar chart and line chart show raw revenue totals, but they cannot answer questions like "is this month better than last year?" or "what share of total revenue does Estonia contribute?"
These are analytical comparisons that require calculated measures written in DAX (Data Analysis Expressions). In this step, you'll mark your Date table to unlock time intelligence functions, then write five DAX measures that transform your visuals from displaying numbers into delivering insights.
In this step, get ready to:
- Mark DimDate as the official Date table and disable Auto date/time.
- Create five DAX measures using SUM, CALCULATE, SAMEPERIODLASTYEAR, DIVIDE, and REMOVEFILTERS.
- Enhance your visuals with a Card, prior-year overlay line, and interactive slicers.
Mark the Date table
Time intelligence functions like SAMEPERIODLASTYEAR need Power BI to know which table holds your calendar dates. Marking DimDate as the Date table tells Power BI to use it for all time-based calculations.
- Switch to Model view by clicking the model icon (three connected boxes) in the left sidebar.
- Click the DimDate table header to select it.
- On the Table tools ribbon, click Mark as date table.
- In the dropdown that appears, select full_date as the date column.
- Click OK to confirm.
Why mark the Date table?
Power BI's Auto date/time feature creates hidden internal date tables for every date column. These conflict with your explicit DimDate and prevent time intelligence functions from working correctly.
Marking DimDate tells Power BI: "this is my calendar. Use it for all time-based calculations." Without this step, functions like SAMEPERIODLASTYEAR will fail.
Now disable the Auto date/time feature so it does not create conflicting hidden tables.
- Click File in the top menu bar.
- Select Options and settings, then click Options.
- In the left pane under the CURRENT FILE group, click Data Load.
- In the Time intelligence section, uncheck Auto date/time.
- Click OK.
Look at the DimDate table header in Model view. You should see a small calendar icon confirming it is now the marked Date table.
Don't see the calendar icon?
Make sure you clicked the DimDate table header (not a column inside it) before using Mark as date table. If the option is greyed out, confirm full_date has a Date data type by selecting the column and checking Column tools > Data type.
help me mark DimDate as the Date table in Power BI Desktop
Create the basic aggregation measures
DAX measures are reusable formulas that calculate on the fly whenever a visual requests data. You will create five measures total, starting with two simple aggregations.
- Switch back to Report view by clicking the report icon in the left sidebar.
- In the Data pane on the right, click stg_sales_orders to select it.
- On the Home ribbon, click New Measure.
- Type the following formula in the formula bar and press Enter:
Total Revenue = SUM(stg_sales_orders[line_total])
- Click New Measure again and enter the second formula:
Total Units = SUM(stg_sales_orders[quantity])
What do these measures do?
Total Revenue sums the line_total column across whatever filters are active (country slicer, date range, etc.). Total Units does the same for quantity.
Unlike dragging a column directly onto a visual (which creates an implicit SUM), explicit measures give you a named, reusable formula that other measures can reference.
Check the Data pane. You should see Total Revenue and Total Units listed under stg_sales_orders with a small calculator icon next to each name.
Create the time intelligence and analytical measures
The next three measures use CALCULATE to evaluate Total Revenue in a modified filter context. This is where DAX goes beyond simple aggregation.
- Click New Measure and enter the prior-year revenue formula:
Revenue PY = CALCULATE([Total Revenue], SAMEPERIODLASTYEAR(DimDate[full_date]))
What does SAMEPERIODLASTYEAR do?
SAMEPERIODLASTYEAR shifts whatever date filter is active back by exactly one year. If a visual is showing March 2025, this function returns the dates for March 2024 instead.
CALCULATE then evaluates [Total Revenue] against those shifted dates. The result is last year's revenue for the same time period.
To verify this works, drag Revenue PY onto an empty area of the canvas to create a quick Card visual. If you are viewing 2025 data, you should see a revenue number. If viewing only 2024, it shows BLANK (there is no 2023 data). This is expected behavior.
- Click New Measure and enter the year-over-year percentage formula:
Revenue YoY % = DIVIDE([Total Revenue] - [Revenue PY], [Revenue PY])
- Click New Measure one more time and enter the percentage-of-total formula:
Revenue % of Total = DIVIDE([Total Revenue], CALCULATE([Total Revenue], REMOVEFILTERS(stg_sales_orders[subsidiary_country])))
What do these two measures calculate?
Revenue YoY % divides the difference between current and prior-year revenue by the prior-year revenue. The result is a growth or decline percentage.
Revenue % of Total uses REMOVEFILTERS to ignore any country filter in the denominator. This means the denominator always shows total revenue across all countries, so each country's bar displays its share of the whole.
Delete the temporary Revenue PY Card you created earlier (click it and press Delete). You will use it properly in the next substep.
✔️ Awesome, I've got all five measures!
Great. Confirm all five measures appear in the Data pane under stg_sales_orders with calculator icons.
ⓧ I'd like to double check the full code
Here are all five DAX measures you should have created:
Total Revenue = SUM(stg_sales_orders[line_total])
Total Units = SUM(stg_sales_orders[quantity])
Revenue PY = CALCULATE([Total Revenue], SAMEPERIODLASTYEAR(DimDate[full_date]))
Revenue YoY % = DIVIDE([Total Revenue] - [Revenue PY], [Revenue PY])
Revenue % of Total = DIVIDE([Total Revenue], CALCULATE([Total Revenue], REMOVEFILTERS(stg_sales_orders[subsidiary_country])))
Each measure is entered separately via Home > New Measure. If any measure shows an error, click it in the Data pane, check the formula bar for typos, and press Enter to save the correction.
Enhance your visuals with measures and slicers
Now put your measures to work. You will add a Card visual, overlay a prior-year comparison line, and add slicers that dynamically filter all measures at once.
- Click an empty area on the canvas.
- In the Visualizations pane, select the Card visual type.
- From the Data pane, drag Revenue YoY % into the Card's Fields well.
- With the Card selected, open the Format pane (paint roller icon). Under Callout value, set the display units to None and toggle the format to percentage.
Your Card now displays a YoY growth percentage. Next, add the prior-year line to your existing line chart.
- Click your existing line chart (the one showing monthly revenue).
- From the Data pane, drag Revenue PY into the Y-axis well alongside the existing line_total.
The line chart now shows two lines: current revenue and prior-year revenue overlaid for direct comparison.
- Click an empty area on the canvas.
- In the Visualizations pane, select the Slicer visual type.
- Drag subsidiary_country from the Data pane into the slicer's Field well.
- Click another empty area and create a second Slicer visual.
- Drag order_year into this slicer's Field well.
Before you click a slicer value, predict what will happen to your Revenue YoY % Card and the two lines on your line chart. Will the values change?
- Click Estonia in the country slicer.
All visuals instantly filter to Estonia-only data. The Card recalculates to show Estonia's YoY growth. The bar chart shrinks to one bar. The line chart adjusts its scale. Click Estonia again to deselect it and restore the full view.
- As a final check, right-click a country bar in your bar chart.
- Hover over the bar to see the tooltip. Drag Revenue % of Total into the Tooltips well of the bar chart's Visualizations pane.
- Hover over a country bar again. The tooltip now shows that country's share of total revenue.
- Save your file by pressing Ctrl+S.
Revenue YoY % showing BLANK?
This is expected when viewing only 2024 data (no 2023 exists for comparison). Click 2025 in your year slicer and the Card should display a percentage value.
If it is still BLANK even for 2025, confirm DimDate is marked as the Date table (check for the calendar icon in Model view) and that Auto date/time is disabled.
help me troubleshoot why my Revenue YoY % DAX measure shows BLANK when I expected a percentage value
Your visuals now deliver real analytical insights instead of raw totals. Next up, you will build a drillthrough page that lets you right-click any customer and jump straight to their individual order history.
Build the Customer Drillthrough Page
Your DAX measures now power dynamic insights across your dashboard. Clicking a slicer recalculates year-over-year growth and percentage-of-total in real time.
But what happens when a sales manager spots a customer contributing significant revenue and wants to investigate further? The aggregated country-level view cannot show individual order history or category breakdown. Drillthrough pages solve this. They let you right-click any customer and jump to a dedicated detail page filtered to that customer, without cluttering your main dashboard.
In this step, get ready to:
- Create a dedicated drillthrough page filtered by customer name.
- Build detail visuals showing revenue, order history, and category breakdown.
- Test the drillthrough by right-clicking a customer on your main page.
Create the drillthrough page
A drillthrough page is a hidden detail page that activates only when a user right-clicks a specific data point. You configure it by placing a field into the Drillthrough filters well. Power BI then auto-generates a back arrow button so users can return to where they came from.
- In Power BI Desktop, make sure you are in Report view.
- Click the + icon at the bottom of the canvas (next to your existing page tab) to add a new page.
- Right-click the new page tab at the bottom.
- Select Rename Page.
- Type Customer Details and press Enter.
You should see a blank page with the tab labelled Customer Details at the bottom.
- On the Customer Details page, look at the Visualizations pane on the right.
- Scroll down in the Visualizations pane until you see the Drillthrough section.
- From the Data pane, expand stg_sales_orders and drag customer_name into the Drillthrough filters well.
A back arrow button automatically appears in the top-left corner of your canvas. This is Power BI confirming that drillthrough is configured.
What does drillthrough do?
When you place customer_name in the Drillthrough well, you tell Power BI: any visual on another page that contains customer_name should offer a right-click option to navigate here.
When a user drills through, Power BI automatically filters this entire page to the selected customer. Every visual on this page shows only that customer's data.
Don't see the Drillthrough section?
Make sure you do not have any visual selected on the canvas. Click an empty area of the canvas first. The Drillthrough section appears in the Visualizations pane only when viewing page-level settings (no visual selected).
If you still cannot find it, look below the Filters on this page section in the pane.
Need more help? Why can't I find the Drillthrough section in the Visualizations pane?
Build the detail visuals
Now you will add three visuals to this page. Each one answers a different question about the drilled customer: how much revenue they contribute, what they ordered, and which product categories they favour.
- Click an empty area of the Customer Details canvas.
- In the Visualizations pane, click the Card visual icon.
- From the Data pane, drag Total Revenue (under stg_sales_orders) into the Card's Fields well.
The Card displays the total revenue across all customers for now. Once a user drills through, it will auto-filter to show only the selected customer's revenue.
- Click an empty area of the canvas to deselect the Card.
- In the Visualizations pane, click the Table visual icon.
- From the Data pane, drag the following fields into the Table's Columns well one at a time: order_date, product_name, product_category, quantity, line_total.
You should see a Table visual listing all 156 order rows with five columns. When drillthrough is active, this table will show only the selected customer's orders.
- Click an empty area of the canvas to deselect the Table.
- In the Visualizations pane, click the Donut chart visual icon.
- Drag product_category into the Legend well.
- Drag Total Revenue into the Values well.
The Donut chart now shows the revenue split across all product categories. When filtered by drillthrough, it will show only the selected customer's category breakdown.
- Save your file by pressing Ctrl+S.
Your Customer Details page should now show three visuals (Card, Table, Donut chart) plus the auto-generated back arrow in the top-left corner.
Donut chart looks empty or shows no data?
Make sure you dragged the Total Revenue measure (not line_total the column) into the Values well. The measure has a calculator icon next to it in the Data pane.
Also confirm product_category is in the Legend well, not the Values well.
Still stuck? Help me fix my Donut chart on the Customer Details page.
Test the drillthrough
The drillthrough is configured, but you need a visual on Page 1 that contains customer_name to activate it. Your current bar chart uses subsidiary_country, not customer names. You will add a quick bar chart by customer to enable testing.
- Click the Page 1 tab at the bottom to return to your main report page.
- Click an empty area of the canvas.
- In the Visualizations pane, select the Clustered bar chart icon.
- Drag customer_name to the Y-axis.
- Drag line_total to the X-axis.
You should see a bar chart listing customers ranked by revenue. Now test the drillthrough.
Before you try this, what do you think will happen when you right-click a customer name? Will the context menu show an option to navigate to your Customer Details page?
- Right-click any customer bar in your new bar chart.
- In the context menu, hover over Drillthrough.
- Click Customer Details.
The Customer Details page opens, filtered to the customer you selected. The Card shows only that customer's revenue. The Table shows only their orders. The Donut chart shows only their category breakdown.
- Click the back arrow button in the top-left corner of the Customer Details page to return to Page 1.
You are back on your main dashboard with all data restored.
Why does the back arrow exist?
Power BI auto-generates the back arrow on any drillthrough page. It ensures users always have a one-click path back to where they came from, preserving their navigation context.
Drillthrough option greyed out or missing?
The right-click menu only shows Drillthrough when the visual contains the field you placed in the Drillthrough filters well. Confirm your bar chart uses customer_name on an axis.
Also make sure you right-clicked directly on a bar (a data point), not on empty space within the chart.
Still not working? Help me troubleshoot why Drillthrough is greyed out in my right-click menu.
- Save your file by pressing Ctrl+S.
Your drillthrough page is fully functional. Sales managers can now investigate any customer with a single right-click. Next up, you will lock down this dashboard so each country manager sees only their own subsidiary's data.
Implement Row-Level Security
Your drillthrough page gives managers the ability to investigate individual customers on demand. The next challenge is making sure each manager only sees data from their own country.
In the real JNG group, the Estonia country manager should never see Latvia or Lithuania data. Row-level security enforces this restriction at the data model level, so you build one report that serves all three managers with appropriate filters. This is a key requirement: security built into the data layer.
In this step, get ready to:
- Define three static RLS roles with DAX filter expressions on the stg_sales_orders table.
- Validate each role using View as to confirm data isolation across all visuals.
Create the Estonia Manager role
Each RLS role contains a DAX filter expression that restricts which rows a user assigned to that role can see. You will create one role per country, starting with Estonia.
- Click the Modeling ribbon tab at the top of Power BI Desktop.
- Click Manage Roles.
- In the Manage roles window, click New to create a new role.
- Under Roles, type Estonia Manager as the role name and press Enter.
- Under Select tables, select stg_sales_orders.
- In the Table filter DAX expression area, click Switch to DAX editor.
- Enter the following DAX filter expression:
[subsidiary_country] = "Estonia"
- Click the checkmark icon to validate the expression.
- Click Save.
What does this expression do?
The filter expression [subsidiary_country] = "Estonia" restricts any user assigned to this role to only see rows where the subsidiary_country column equals "Estonia". Every visual in the report automatically respects this filter because it applies at the model level.
Create the Latvia and Lithuania Manager roles
- Click Manage Roles on the Modeling ribbon tab again.
- Click New to create a second role.
- Name it Latvia Manager and press Enter.
- Select stg_sales_orders under Select tables.
- Click Switch to DAX editor and enter the following expression:
[subsidiary_country] = "Latvia"
- Click the checkmark to validate.
- Click New again to create a third role.
- Name it Lithuania Manager and press Enter.
- Select stg_sales_orders under Select tables.
- Click Switch to DAX editor and enter the following expression:
[subsidiary_country] = "Lithuania"
- Click the checkmark to validate.
- Click Save to save all three roles.
You should now see all three roles listed in the Manage roles window: Estonia Manager, Latvia Manager, and Lithuania Manager.
Why static roles instead of dynamic?
JNG has exactly three subsidiaries (Estonia, Latvia, Lithuania). Static rules are simple, require no user-mapping table, and are testable locally without publishing to the Power BI Service.
Dynamic RLS uses USERPRINCIPALNAME() to filter by the signed-in user's email. That approach requires publishing to the service and assigning actual users to roles. For a small, fixed number of roles, static is the correct production pattern.
Test with View as
Before you test, predict what will happen. If the Estonia Manager role works correctly, what should disappear from your bar chart and line chart?
- On the Modeling ribbon tab, click View as.
- In the View as roles window, check the box next to Estonia Manager.
- Click OK.
Your entire report now filters to Estonia-only data. Latvia and Lithuania disappear from the bar chart. The line chart shows only Estonian revenue trends. The Revenue YoY % card recalculates for Estonia alone.
- Click View as on the Modeling ribbon tab again.
- Uncheck Estonia Manager and check Latvia Manager.
- Click OK.
The dashboard transforms to show only Latvian data. Estonia and Lithuania disappear entirely from all visuals.
- Click Stop viewing to return to the full unfiltered dataset.
Still seeing all countries after selecting a role?
Make sure you selected the correct table (stg_sales_orders) when defining each role. If the role has no table filter, it applies no restriction.
Check that your DAX expression uses the exact column name [subsidiary_country] and that the country value is in double quotes with the correct spelling ("Estonia", "Latvia", "Lithuania").
Help me troubleshoot why my RLS role is not filtering data correctly in Power BI Desktop.
What about assigning real users?
User-to-role assignment happens only after you publish the report to the Power BI Service. In Desktop, View as is the way to validate that each role filters correctly before publishing.
- Save your file by pressing Ctrl+S.
Secret mission
Product Category Performance Matrix with Conditional Formatting
The CEO wants to spot which product categories are growing and which are declining at a glance, without reading individual numbers. Can you build a heatmap-style matrix that makes performance patterns jump off the screen?
Clean Up Your Resources
Clean Up Your Resources
Decide whether to keep your resources running, pause them to come back later, or delete them entirely. This project runs entirely locally, so there are no ongoing costs.
Resources you used:
- BalticDW_Report.pbix file on your Desktop (local file, no cost).
- SQL Server 2025 Developer Edition running locally (free, installed in Project 1).
- Power BI Desktop installed from the Microsoft Store (free).
Keep everything running
No action needed. Choose this if you are still actively building or plan to extend the report further.
- Leave the BalticDW_Report.pbix file on your Desktop. You can open and modify the report anytime.
- SQL Server continues running in the background. Your BalticDW database stays available for all three projects in this series.
- Power BI Desktop stays installed and ready to open your report.
Pause - I'll come back to this later
Shut down SQL Server to free up memory. Your BalticDW_Report.pbix file opens in Power BI Desktop anytime because the data is imported locally in the file. SQL Server does not need to be running to view the report.
- Press the Windows key, type services.msc, and press Enter.
- Scroll down to find SQL Server (MSSQLSERVER) in the list.
- Right-click it and select Stop.
- When you want to resume, right-click the same service and select Start.
Delete - I don't want to use this again
Remove the report file from your Desktop. Your BalticDW database and dbt models from Projects 1 and 2 remain untouched.
- Delete the BalticDW_Report.pbix file from your Desktop. You can do this by right-clicking the file in File Explorer and selecting Delete.
- Your BalticDW database on SQL Server is unchanged. The stg_sales_orders view and DimDate table remain available for future projects.
What about Power BI Desktop?
Power BI Desktop is free and takes no ongoing resources when closed. There is no reason to uninstall it unless you need the disk space. If you do want to remove it, go to Settings, then Apps, search for Power BI Desktop, and select Uninstall.
Nice Work!
Nice Work!
You just built a production-style Power BI reporting dashboard on top of your BalticDW data warehouse. From raw SQL Server tables to interactive visuals with business-grade security, this is exactly how analytics engineers deliver insights to stakeholders.
You've learned how to:
- Build a multi-page Power BI report connected to a SQL Server data warehouse via Import mode, with DAX measures using CALCULATE, SAMEPERIODLASTYEAR, DIVIDE, and REMOVEFILTERS that transform raw numbers into year-over-year and share-of-total business insights.
- Create an interactive drillthrough page that lets users right-click any customer and jump to their complete order history and category breakdown.
- Implement static row-level security with three country-based roles, proving each Baltic subsidiary manager sees only their own data.
- Secret Mission: Built a product category performance matrix with conditional formatting and a month-over-month growth DAX measure for instant visual pattern recognition.
Ready to quiz yourself?