Forum Discussion
Creating a Measure based on Previous day
- Anonymous6 years ago
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.
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.
Anonymous Thanks! This worked out perfectly!!!!