Forum Discussion

nosaj03's avatar
nosaj03
Helper II
6 years ago
Solved

Creating a Measure based on Previous day

Hello all!   I have a Sales table of employees by day by item category and total time on sale   I want to create a measure that shows the averge time for sales for by employee for the previous da...
  • Anonymous's avatar
    Anonymous
    6 years ago

    nosaj03 

     

    You should use Today() instead of Now(), because Now()-1 return current time-1 second, not previous day.  And for the sample you provided, you can test it by replace Today() with Date(2020,5,19) to check the average of 5/18

     

    Measure Calculate(divide(sum([Time ]),sum([Sales]),0),filter('Table',[Date]= TODAY()-1))

     

     

    Paul Zheng _ Community Support Team
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.