Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Looking to solve a value with measure.

I have a value of "engine hours" reported daily. I am looking for a measure to tell me the avg number of hours this machine is using in a day. The measure I am using is erroring out.  Any help would be greatly appreciated. 

5 Replies

  • Hi , could you be more detailed with the 'The measure I am using is erroring out'

  • Anonymous's avatar
    Anonymous
    Not applicable

    I tried

     

    last date (hours) -  First date (hours) / 5 (working week). 

    However, it says first date and last date are a yes/no option. 

    • mdgene's avatar
      mdgene
      Icon for Helper I rankHelper I

      It depends on a lot of things I cant see. but have a look. if you have a data set in this format

       

      then simply create your measures

       

      YestedayHours = SUM('Hours Table'[Hours])
      TodaysHours = SUM('Hours Table'[Hours])
       
      and you can do your calculation on it using
      calcavg = DIVIDE(
      ([YestedayHours] - [TodaysHours]),
      5,
      0)
      or
      Calcavg2 = AVERAGE('Hours Table'[Hours])

       

       

      but it depends on your data structure and what you are trying to achieve.

      Thank you

      • Anonymous's avatar
        Anonymous
        Not applicable

        This is my table. I'm looking to have an average of the difference per day/week.