Forum Discussion

msommerf's avatar
msommerf
Icon for Helper III rankHelper III
7 years ago

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?

 

Any assistance appreciated.

4 Replies

  • v-eachen-msft's avatar
    v-eachen-msft
    Icon for Community Support rankCommunity 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.


     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    You can get the result.

    Best Regards,

    Eads

     

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

    • msommerf's avatar
      msommerf
      Icon for Helper III rankHelper III

      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.

      • v-eachen-msft's avatar
        v-eachen-msft
        Icon for Community Support rankCommunity Support

        Hi msommerf ,

         

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

        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.