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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
dannytan1112
Helper I
Helper I

Night and Day plot area background

Hi There,

 

I have a question that i can do in Excel however I am having difficulties on doing it in Power BI. 
Is there anyway to make plot area background like this in Power BI?

dannytan1112_0-1672035730488.png

 

I would like to make data from 6pm-6am as black bar chart background and the rest data as white bar chart background indicating day time data. Thanks

2 ACCEPTED SOLUTIONS
lbendlin
Super User
Super User

While you could fudge this with an appropriately prepared background image

lbendlin_0-1672097780901.png

this might be the perfect opportunity to try out a custom visual generator like Charticulator or Deneb.

 

lbendlin_1-1672100427145.pnglbendlin_2-1672100477635.png

If you want "Day/Night" boundaries you could modify the calculated column like 

 

BG = if(hour('System Counters'[AggregationEndTimeUTC])>17 || hour('System Counters'[AggregationEndTimeUTC])<6 ,100,0)

 

lbendlin_3-1672101423641.png

 

View solution in original post

You can do that as a calculated column, a measure, or as a calculation item in Deneb. Be mindful of the UX.

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

While you could fudge this with an appropriately prepared background image

lbendlin_0-1672097780901.png

this might be the perfect opportunity to try out a custom visual generator like Charticulator or Deneb.

 

lbendlin_1-1672100427145.pnglbendlin_2-1672100477635.png

If you want "Day/Night" boundaries you could modify the calculated column like 

 

BG = if(hour('System Counters'[AggregationEndTimeUTC])>17 || hour('System Counters'[AggregationEndTimeUTC])<6 ,100,0)

 

lbendlin_3-1672101423641.png

 

Really Really thanks. it works for me.

Btw i have question, is it possible to make that 100 value in BG became variable?

Let say max value of a column in Table(x) ?

You can do that as a calculated column, a measure, or as a calculation item in Deneb. Be mindful of the UX.

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors