2023 Week 21 | Power BI: Create a Theme – With a Twist!

Introduction

This week, we’re building on Shannon’s theme from Week 17 2022 by creating a custom Power BI theme–with a twist!

 

Instead of manually selecting colors, this week you’ll use OpenAI’s free version of ChatGPT (or your Large Language Model (LLM) of choice) to create a theme. You’re in control of your prompts, and you’ll be able to evaluate questions like:

  • How does it do overall with color selection, text, or other properties? 
  • In what ways does it accelerate your effort to create a theme, and in what ways is it cumbersome?

  • Can you use it to build a theme that is accessible, provides appropriate contrast, or define other outcomes that are important to you?

WOW Sample Report

Admittedly, after Microsoft teased Copilot in Power BI yesterday, manually creating a theme using a LLM like ChatGPT already feels outdated. How did technology around work evolve this quickly…?

Requirements

  • Build a simple report in Power BI Desktop that uses the sample Financials dataset, or your own report and dataset as desired. The focus this week is on exploring variations of themes more than exactly replicating what’s visualized.
  • Download the starter JSON theme file for Power BI. This is a basic theme file that provides default colors, fonts, and a few more properties.
  • Access the free ChatGPT at https://chat.openai.com/ or use your favorite comparable LLM.
  • “Train” GPT with a one-shot or few-shot learning prompt that includes instructions stating your purpose, desired outcome, and the sample JSON linked above.

For example, you could start by prompting GPT to match the structure of the JSON you paste in:

Use the following JSON theme as the template 
for a new Power BI report theme. 
You will output JSON to match 
the structure of this JSON.
{
 "name": "WOWDefaultTheme",
"dataColors": [
"#118DFF",
"#12239E",
[...]
}

 

  • Explore variations with sample prompts like 
    • “Replace all fonts except Callout with Tahoma”
    • “Change the data colors to match the viridis color scale”
    • “Change the data colors to a gradient that includes the University of Michigan color palette”
    • “Change the data colors to high contrast colors”
  • Get creative with your prompts, and after every variation, copy the JSON that ChatGPT provides into a text editor, save the JSON, import it as a theme into Power BI Desktop, and view the results.
  • Publish and share your report, or simply share your prompts and screenshots of your final outputs. Plus, share what worked well and what didn’t! Remember, AI is a “copilot”, not a replacement for your judgment.

Dataset

Use Power BI Desktop’s built-in Financials dataset or a dataset of your choice.

Share

After you finish your workout, share on Twitter using the hashtags #WOW2023 and #PowerBI, and tag @MMarie, @shan_gsd, @KerryKolosko, and @dataveld. Also make sure to fill out the Submission Tracker so that we can count you as a participant this week in order to track our participation throughout the year.

Solution

Sample prompts

1 thought on “2023 Week 21 | Power BI: Create a Theme – With a Twist!”

Comments are closed.

Scroll to Top