The BI Corner

Empowering BI enthusiasts, The BI Corner aims to elevate practices & share top trends in analytics, UX, & UI. Join us in advancing BI through leading insights & cutting-edge research. #BICorner #Analytics #UserExperience #UserInterface

Member-only story

Conditionally Color-Coding Line Charts in Power BI 📈

6 min readApr 26, 2025

--

By Isabelle Bittar for KI Data Science

🎁PBIX available for download at the end of this article!

Introduction

So, I’ve written about this before, but I recently figured out a better workaround for conditionally color-coding line charts in Power BI 😅. It’s actually pretty simple, and I’ve been using it a lot lately on my current projects.

Unlike bar/column charts — where we can conditionally set the color using the fx — line charts only let us select a single, static color. That can be a big limitation when you want the line color to change based on certain scenarios. In this case, I wanted it to be green if the price of Bitcoin increased and red if it decreased, based on the selected timeframe.

In this article, I’ll walk you through how I built a line chart that dynamically changes color based on Bitcoin’s price variation.

Conditionally Formatting Option Not Available for Line Charts vs. Bar Charts in Power BI

Step 1: Getting Started

For the data, I’ve loaded a Bitcoin table in Power BI with historical prices I retrieved from Investing.com.

--

--

The BI Corner
The BI Corner

Published in The BI Corner

Empowering BI enthusiasts, The BI Corner aims to elevate practices & share top trends in analytics, UX, & UI. Join us in advancing BI through leading insights & cutting-edge research. #BICorner #Analytics #UserExperience #UserInterface

Isabelle Bittar
Isabelle Bittar

Written by Isabelle Bittar

Isabelle is a Montreal-based business consultant specialized in data science.