Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
jj6291
Frequent Visitor

Dynamically format line color of two date snapshots of forecasts (Sample file attached)

Problem

I have a data set that has snapshots of forecasts. As you can see in the screenshot below, we have forecasts of the same dates, 1 Feb, 1 March, 1 Apr, 1 May at different points in January.

jj6291_0-1676869544351.png

 

I want to make a plot that compares two snapshots, one in the past and a later one. This is easy to do by creating a new column that links the category and snapshot date (see above). This makes the plot I am after, but the colors are all different and make it hard to read.

jj6291_1-1676869694286.png

 

Manually changing the colors won't work since the dates will always be changing, so the solution needs to be dynamic.

 

What I want:

I want to dynamically give the older date one color and the newest date another color so comparisons are easy, for example I did this below.

jj6291_2-1676869861038.png

 

 

I tried creating a measure that gets the min and max date of the slicer selection and use that to make a new column that says Category - Old or Category - New depending on it's asatdate, but that didn't work for me. Open to other ideas, im sure there is a simple fix that I am missing.

 

Thank you!

 

 

Here is a link to a sample file i made:

https://drive.google.com/file/d/1cUyt8vnuyfNKWDCOdynAqSnFPiS57GZH/view?usp=sharing

2 REPLIES 2
amitchandak
Super User
Super User

@jj6291 , Conditional formatting is not supported in line visual. Also, the marker color workaround does not work when using legend

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Yes, but if I create a column that classifies the before and after date, then I can use that in the legend field right?

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors