Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Count by Time visual changing upon refresh

 

 

Hi all,

I have bar visual that I created in desktop that tallies(counts) the number of visitors by time. The visual does exactly what I want it to do and when I publish it to the service it stays the same until my scheduled refresh is trigerred. As you can see in the images the original visual changes. The correct time has a peak around 9am. Any help will be appreciated. Thanks

 

Dax code_time columnTime BinPost Refresh GraphThe Correct Graph

3 Replies

  • Hi there

    Do you use the NOW() function? That will happen because the Power BI Servers have their Time stored in UTC

    So you will have to offset it by the timezone you are in?
    • Anonymous's avatar
      Anonymous
      Not applicable

      Hey GilbertQ thanks for your reply. I have not used Now() before. I'm looking into it now but I'm having difficulty understanding how to structude the Dax code in this context. It looks like Now() does not take any arguments. Do you have an example of how you would create a measure using now() that would accomplish this? I would really appreciate it.

       

      Thanks

      • GilbertQ's avatar
        GilbertQ
        Super User

        Hi Anonymous 


        Here is the DAX Measure you can create below. You will see that I have used TIME(10,0,0) this is where my timezone is GMT + 10 so I have added 10 hours to the time, so that when it refreshes in the Power BI Service it shows it in my timezone.

         

        Time Now = UTCNOW() + TIME(10,0,0)

         And this is what it looks like in the Power BI Service