cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
msommerf
Helper II
Helper II

Highlight Current Hour in column chart

Hi, Please can somebody help?

 

I have a stacked barchart visual on a report which displays the number of vehicles required each hour of each day.

Is there a way to highlight the bar for the current hour for today?

Vehicles required.jpg

 

Any assistance appreciated.

4 REPLIES 4
v-eachen-msft
Community Support
Community Support

Hi @msommerf ,

 

You need to create a new measure.

Measure =
VAR a =
    HOUR ( SELECTEDVALUE ( 'testTable'[date] ) )
VAR b =
    HOUR ( NOW () )
RETURN
    IF ( a = b, "#ff6600" ) 

 

Then make a color rule with this measure.


2-1.PNG2-2.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

You can get the result.2-3.PNG

Best Regards,

Eads

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

Many thanks for your response,

This works perfectly for a standard barchart but does not work with a stacked barchart with legend data.

There is no FX option to format the colour(s)

 

Regards

Mark.

Hi @msommerf ,

 

Move your mouse pointer over the default color and right click on it, there will be an option to display.ss.PNG

Click it and you can define the color rules as my previous reply.

 

Best Regards,

Eads

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

Thanks for getting back to me.

There is no default colour when you have a stacked bar with legend.

Datacolours.jpg

 

If I remove my legend this works fine:

Datacolours 2.jpg

 

When I add my legend back in, there are no options to change the bar colour based on a formula.

 

Regards

Mark.

Helpful resources

Announcements
MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Top Solution Authors
Top Kudoed Authors