Bird
Raised Fist0
Power BIbi_tool~20 mins

Color themes in Power BI - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Color Theme Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Color Theme JSON Structure

Which of the following JSON snippets correctly defines a Power BI color theme with three custom colors named "Primary", "Secondary", and "Accent"?

A{ "name": "CustomTheme", "dataColors": { "Primary": "#FF5733", "Secondary": "#33FF57", "Accent": "#3357FF" } }
B{ "themeName": "CustomTheme", "colors": ["Primary": "#FF5733", "Secondary": "#33FF57", "Accent": "#3357FF"] }
C{ "name": "CustomTheme", "dataColors": ["#FF5733", "#33FF57", "#3357FF"] }
D{ "name": "CustomTheme", "dataColors": ["Primary", "Secondary", "Accent"] }
Attempts:
2 left
💡 Hint

Look for the correct JSON format where colors are listed as an array of hex codes.

❓ dax_lod_result
intermediate
1:30remaining
Effect of Color Theme on Visual Measure Display

You apply a color theme with the following dataColors: ["#0000FF", "#00FF00", "#FF0000"]. You have a bar chart with three categories: A, B, and C. Which color will category B's bar use by default?

A#0000FF (Blue)
B#00FF00 (Green)
C#FF0000 (Red)
DDefault gray color
Attempts:
2 left
💡 Hint

Colors are assigned in order to categories starting from the first color.

❓ visualization
advanced
2:30remaining
Choosing Accessible Color Themes for Reports

You want to create a Power BI report color theme that is friendly for colorblind users. Which color palette below is best suited for this purpose?

A["#800080", "#008000", "#000080"] (Purple, Green, Navy)
B["#FF0000", "#00FF00", "#0000FF"] (Red, Green, Blue)
C["#FF69B4", "#FFD700", "#00FFFF"] (Pink, Gold, Cyan)
D["#0072B2", "#D55E00", "#E69F00"] (Blue, Vermilion, Orange)
Attempts:
2 left
💡 Hint

Look for colors that are distinguishable by people with common types of color blindness.

🔧 Formula Fix
advanced
2:30remaining
Identifying Error in Custom Color Theme JSON

Which option contains a syntax error that will cause Power BI to reject the custom color theme JSON file?

{
  "name": "MyTheme",
  "dataColors": ["#123456", "#654321", "#abcdef"],
  "background": "#FFFFFF",
  "foreground": "#000000",
  "tableAccent": "#FF00FF",
  "extra": { "highlight": "#FFFF00" }
}
A{ "name": "MyTheme", "dataColors": ["#123456", "#654321", "#abcdef"], "background": "#FFFFFF", "foreground": "#000000", "tableAccent": "#FF00FF", "extra": "highlight": "#FFFF00" }
B{ "name": "MyTheme", "dataColors": ["#123456", "#654321", "#abcdef"], "background": "#FFFFFF", "foreground": "#000000", "tableAccent": "#FF00FF", "extra": { "highlight": "#FFFF00" } }
C{ "name": "MyTheme", "dataColors": ["#123456", "#654321", "#abcdef"], "background": "#FFFFFF", "foreground": "#000000", "tableAccent": "#FF00FF" }
D} } "00FFFF#" :"thgilhgih" { :"artxe" ,"FF00FF#" :"tneccAelbat" ,"000000#" :"dnuorgerof" ,"FFFFFF#" :"dnuorgkcab" ,]"fedcba#" ,"123456#" ,"654321#"[ :"sroloCatad" ,"emehTyM" :"eman" {
Attempts:
2 left
💡 Hint

Check the JSON syntax carefully for missing braces or misplaced colons.

🎯 Scenario
expert
3:00remaining
Designing a Dynamic Color Theme for Multiple Report Pages

You manage a Power BI report with multiple pages, each representing a different product category. You want to create a color theme that automatically assigns a unique color to each category and ensures consistent colors across all pages without manually editing each visual. Which approach best achieves this?

AUse a calculated column in the data model to assign color hex codes and bind colors dynamically in visuals using conditional formatting.
BManually set colors for each visual on every page to match category colors.
CApply the default Power BI theme and rely on automatic color assignment per visual.
DDefine a custom color theme JSON with a long dataColors array listing all category colors in order.
Attempts:
2 left
💡 Hint

Think about how to link data values to colors dynamically and consistently.

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