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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
msommerf
Helper III
Helper III

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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