Bird
Raised Fist0
Power BIbi_tool~15 mins

Color themes in Power BI - Real Business Scenario

Choose your learning style10 modes available
Scenario Mode
👤 Your Role: You are a sales analyst at a retail company.
📋 Request: Your manager wants a sales dashboard that uses consistent and visually appealing color themes to make it easy to understand sales performance by region and product category.
📊 Data: You have monthly sales data including Region, Product Category, Sales Amount, and Month.
🎯 Deliverable: Create a Power BI sales dashboard with charts and tables that apply a custom color theme to highlight regions and product categories clearly.
Progress0 / 7 steps
Sample Data
MonthRegionProduct CategorySales Amount
JanNorthElectronics12000
JanSouthFurniture8500
FebEastElectronics15000
FebWestFurniture7000
MarNorthClothing9000
MarSouthElectronics11000
AprEastClothing9500
AprWestElectronics13000
MayNorthFurniture8000
MaySouthClothing7500
JunEastFurniture6700
JunWestClothing7200
1
Step 1: Import the sales data into Power BI Desktop.
Use 'Get Data' > 'Excel' or 'CSV' to load the sample data table.
Expected Result
Sales data table loaded with columns: Month, Region, Product Category, Sales Amount.
2
Step 2: Create a custom color theme JSON file for the report.
{ "name": "Retail Sales Theme", "dataColors": ["#1f77b4", "#ff7f0e", "#2ca02c", "#d62728"], "background": "#ffffff", "foreground": "#000000", "tableAccent": "#1f77b4" }
Expected Result
A JSON file defining four main colors for regions and categories is ready.
3
Step 3: Import the custom color theme into Power BI Desktop.
In Power BI Desktop, go to 'View' tab > 'Themes' > 'Browse for themes' and select the JSON file.
Expected Result
The report colors update to use the custom theme colors.
4
Step 4: Create a clustered column chart showing Sales Amount by Region and Month.
Visual: Clustered column chart Axis: Month Legend: Region Values: Sum of Sales Amount
Expected Result
Chart displays monthly sales for each region with bars colored by the custom theme.
5
Step 5: Create a stacked bar chart showing Sales Amount by Product Category and Region.
Visual: Stacked bar chart Axis: Region Legend: Product Category Values: Sum of Sales Amount
Expected Result
Chart shows sales distribution by product category within each region, colors matching the theme.
6
Step 6: Add a table visual listing Month, Region, Product Category, and Sales Amount with conditional formatting using theme colors.
Visual: Table Columns: Month, Region, Product Category, Sales Amount Conditional formatting: Background color by Region using theme colors
Expected Result
Table rows are colored by region consistent with the theme for easy reading.
7
Step 7: Review the dashboard for color consistency and accessibility (check color contrast).
Use Power BI's accessibility checker and adjust colors in the JSON theme if needed.
Expected Result
Dashboard colors are consistent, visually appealing, and accessible.
Final Result
Power BI Sales Dashboard

+-----------------------------+
| Month | North | South | East | West |
|-------|-------|-------|------|------|
| Jan   | 12000 | 8500  |      |      |
| Feb   |       |       |15000 | 7000 |
| Mar   | 9000  |11000  |      |      |
| Apr   |       |       | 9500 |13000 |
| May   | 8000  | 7500  |      |      |
| Jun   |       |       | 6700 | 7200 |
+-----------------------------+

Colors: Blue=North, Orange=South, Green=East, Red=West

Stacked Bar Chart: Sales by Product Category per Region
Table: Detailed sales data with region color backgrounds
✓East region leads in Electronics sales in February and April.
✓North region has strong Furniture sales in May.
✓South region shows consistent sales across categories.
✓Color theme helps quickly identify regions and categories in visuals.
Bonus Challenge

Create a dynamic color theme that changes based on sales performance thresholds (e.g., green for high sales, yellow for medium, red for low).

Show Hint
Use DAX measures to classify sales levels and apply conditional formatting rules in Power BI visuals.

Practice

(1/5)
1. What is the main purpose of using color themes in Power BI reports?
easy
A. To add animations to visuals
B. To create new data tables automatically
C. To keep report colors consistent and professional
D. To change the report layout structure

Solution

  1. Step 1: Understand the role of color themes

    Color themes define a set of colors used consistently across a report.
  2. Step 2: Identify the main benefit

    Using color themes ensures visuals look professional and consistent.
  3. Final Answer:

    To keep report colors consistent and professional -> Option C
  4. Quick Check:

    Color themes = Consistent colors [OK]
Hint: Color themes unify colors across visuals [OK]
Common Mistakes:
  • Confusing color themes with animations
  • Thinking color themes create data
  • Assuming color themes change layout
2. Which file format is used to define a custom color theme in Power BI?
easy
A. .json
B. .xlsx
C. .csv
D. .xml

Solution

  1. Step 1: Recall the file format for themes

    Power BI uses JSON files to define color themes with hex codes.
  2. Step 2: Match the correct file extension

    JSON files have the extension .json.
  3. Final Answer:

    .json -> Option A
  4. Quick Check:

    Color themes = JSON files [OK]
Hint: Themes use JSON files with hex colors [OK]
Common Mistakes:
  • Choosing XML instead of JSON
  • Confusing CSV or Excel files for themes
  • Not knowing file extensions
3. Given a Power BI report with a custom color theme applied, what happens when you change the theme JSON file and reapply it?
medium
A. The report layout resets to default
B. Only the background color changes, other colors stay the same
C. The data model refreshes automatically
D. All visuals update their colors according to the new theme

Solution

  1. Step 1: Understand theme application effect

    Applying a theme updates all visuals' colors based on the theme's color definitions.
  2. Step 2: Identify what changes on reapplying theme

    Changing the JSON and reapplying updates all colors, not just background.
  3. Final Answer:

    All visuals update their colors according to the new theme -> Option D
  4. Quick Check:

    Reapplying theme = Update all colors [OK]
Hint: Reapplying theme updates all visual colors [OK]
Common Mistakes:
  • Thinking only background changes
  • Assuming data refresh happens
  • Believing layout resets
4. You tried to apply a custom color theme JSON file but Power BI shows an error. What is the most likely cause?
medium
A. The report has too many visuals
B. The JSON file has invalid syntax or missing commas
C. The data source is offline
D. The theme file is saved as .csv instead of .json

Solution

  1. Step 1: Identify common JSON errors

    Invalid JSON syntax like missing commas or brackets causes errors when applying themes.
  2. Step 2: Exclude unrelated causes

    Number of visuals or data source status does not affect theme application; file extension matters but is less common error than syntax.
  3. Final Answer:

    The JSON file has invalid syntax or missing commas -> Option B
  4. Quick Check:

    JSON syntax errors cause theme load failure [OK]
Hint: Check JSON syntax carefully for commas and brackets [OK]
Common Mistakes:
  • Blaming data source or visuals count
  • Ignoring JSON syntax errors
  • Using wrong file extension
5. You want to create a color theme JSON file that defines three colors: primary (#1A73E8), secondary (#E37400), and background (#F5F5F5). Which JSON snippet correctly defines these colors for Power BI?
hard
A. { "name": "CustomTheme", "dataColors": ["#1A73E8", "#E37400"], "background": "#F5F5F5", "visualStyles": {} }
B. { "themeName": "CustomTheme", "colors": {"primary": "#1A73E8", "secondary": "#E37400", "background": "#F5F5F5"} }
C. { "name": "CustomTheme", "dataColors": ["#1A73E8", "#E37400"] "background": "#F5F5F5" }
D. { "name": "CustomTheme", "dataColors": ["#1A73E8", "#E37400"], "backgroundColor": "#F5F5F5" }

Solution

  1. Step 1: Check required keys for Power BI theme

    Power BI themes use name, dataColors for main colors, and background for background color.
  2. Step 2: Validate JSON keys and structure

    { "name": "CustomTheme", "dataColors": ["#1A73E8", "#E37400"], "background": "#F5F5F5", "visualStyles": {} } correctly uses name, dataColors array, and background key. It also includes visualStyles which is optional but valid.
  3. Final Answer:

    { "name": "CustomTheme", "dataColors": ["#1A73E8", "#E37400"], "background": "#F5F5F5", "visualStyles": {} } -> Option A
  4. Quick Check:

    Correct keys and hex colors = { "name": "CustomTheme", "dataColors": ["#1A73E8", "#E37400"], "background": "#F5F5F5", "visualStyles": {} } [OK]
Hint: Use 'name', 'dataColors', and 'background' keys in JSON [OK]
Common Mistakes:
  • Using wrong key names like 'colors' or 'backgroundColor'
  • Missing required keys like 'dataColors'
  • Incorrect JSON structure or missing commas
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard