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
sebapehl
Regular Visitor

background color of linechart dependent on xaxis values

i have a linechart x and y for which certain values of x should have a a different background color on the chart vertically

pbi example:

sebapehl_1-1716969083128.png

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

expected result: 

sebapehl_0-1716969050804.png

e.g. green background around the odd numbers and no (or another) background around the equal numbers.

 

the original data of the x axis is a timestamp where i want to color the non-business hours (20 to 08).

 

 

 

 

1 ACCEPTED SOLUTION
_AAndrade
Super User
Super User

Hi @sebapehl,

I'm attaching a pbix file with my solution.
The final output is this:

_AAndrade_0-1716971030920.png

You could play around x-axis to change continuos to categorical, but it will depend of how you have your data model.





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




View solution in original post

3 REPLIES 3
_AAndrade
Super User
Super User

Hi @sebapehl,

I'm attaching a pbix file with my solution.
The final output is this:

_AAndrade_0-1716971030920.png

You could play around x-axis to change continuos to categorical, but it will depend of how you have your data model.





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




perfect, thank you!

You're welcome





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




Helpful resources

Announcements
Europe Fabric Conference

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.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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