Forum Discussion

Dunner2020's avatar
Dunner2020
Icon for Post Prodigy rankPost Prodigy
5 years ago
Solved

Time series for time brush visual

Hi there,

 

I am using a time brush (custom visual). The purpose of visual is to provide a filter on time series-related data. However, I noticed that we can only display date-related attributes (such as date, month, year) on the x-axis. We could not use time-related attributes (such as hours) in the visual. Does anyone use time-related attributes in the time brush visual?

  • Hi Dunner2020 ,

     

    After I add a new timetext column to the time table, it works well.

     

    Table = ADDCOLUMNS(ADDCOLUMNS(SELECTCOLUMNS(GENERATESERIES(0,23,1),"Hour",[Value]),"Time",TIME([Hour],0,0)),"Timetext",FORMAT([Time],"hh:nn"))

     

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

     

    Best Regards,

    Dedmon Dai

     

3 Replies

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

    Hi Dunner2020 ,

     

    Based on my test, you can use time column in  time brush slicer. But you need to change the time cloumn to text type instead of time type.

     

     

    Then you can put it in date field:

     

     

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

     

    Best Regards,

    Dedmon Dai

    • Dunner2020's avatar
      Dunner2020
      Icon for Post Prodigy rankPost Prodigy

      v-deddai1-msft , thanks for your reply. I tried the way you told me and it worked. The only issue is that it only displays 12 hours on the chart (starting from 1 am to 12 pm). I want to display 24 hours. Is there a way of doing that?

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

        Hi Dunner2020 ,

         

        After I add a new timetext column to the time table, it works well.

         

        Table = ADDCOLUMNS(ADDCOLUMNS(SELECTCOLUMNS(GENERATESERIES(0,23,1),"Hour",[Value]),"Time",TIME([Hour],0,0)),"Timetext",FORMAT([Time],"hh:nn"))

         

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

         

        Best Regards,

        Dedmon Dai