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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Faste
Regular Visitor

Have an area be shaded when a binary column is set to 1

I'm currently working on a project with engineers and I have some time series data that is being tracked by devices every 5 minutes. Basically, I have a column called " Controller_Water_Heating_Mode " which is a binary column that is 0 when it is off and 1 when it's on. I have another column called "T_HotTank_T2_F" which just tracks the temperature of a specific tank. I was wondering if there is a way for me to have a line chart of T_HotTank_T2_F when controller_water_heating_mode is 0 but when Controller_Water_Heating_Mode is 1, the area is shaded? I was given an example which is attached below. Some people I've asked suggested I could use error bars but it's a feature Im unfamiliar so some help would be great. Thank you for any possible help!

 

MicrosoftTeams-image.png

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Faste ,

 

You can use the errors bars on the line chart. For this you just need to create to measures to get the top and bottom ranges based on the Controller heat map  = 1 should be something similar to:

Top = if(MAX(Table1[Controller Heat]) = 1 , 25)

Bottom = if(MAX(Table1[Controller Heat]) = 1 , 0)

 

In my case I'm simplifying by using the MAX value but you may need to adjust to your model, can be a simple SELECTEDVALUE also the 25 is just what makes sense in my model you can make it how you need for example now use this on the error bars:

 

MFelix_0-1693928239970.png

Has you can see the setup is the following:

  • Erros Bars
  • Type: By Field
    • Upper: Top Measure
    • Bottom: Bottom Measure
  • Bar: off
  • Error Band: on

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Hi @Faste ,

 

You can use the errors bars on the line chart. For this you just need to create to measures to get the top and bottom ranges based on the Controller heat map  = 1 should be something similar to:

Top = if(MAX(Table1[Controller Heat]) = 1 , 25)

Bottom = if(MAX(Table1[Controller Heat]) = 1 , 0)

 

In my case I'm simplifying by using the MAX value but you may need to adjust to your model, can be a simple SELECTEDVALUE also the 25 is just what makes sense in my model you can make it how you need for example now use this on the error bars:

 

MFelix_0-1693928239970.png

Has you can see the setup is the following:

  • Erros Bars
  • Type: By Field
    • Upper: Top Measure
    • Bottom: Bottom Measure
  • Bar: off
  • Error Band: on

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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