Forum Discussion
TODAY function
- 8 years ago
Hi sureshsonti,
The Service uses UTC time. Maybe you can try the formula below.
Yardage = IF ( UTCNOW () = NOW (), CALCULATE ( SUM ( YORX[Qty] ), FILTER ( 'YORX', 'YORX'[order_date] = DATEVALUE ( UTCNOW () + TIME ( 5, 0, 0 ) ) ) ), CALCULATE ( SUM ( YORX[Qty] ), FILTER ( 'YORX', 'YORX'[order_date] = TODAY () ) ) )
This is my data model. Today's Volume will be showing 0 after 7 PM today.
Sch_Qty is what was ordered and Yardage is what was actually delivered
I used this statement by creating a new measure.
Yardage = CALCULATE(SUM(YORX[Qty]),FILTER('YORX','YORX'[order_date]=TODAY()))
So after 7 PM tonight it is showing tomorrow's orders. I am hiding some fields which are customer names and addresses.
My time zone is Central Standard Time (Baton Rouge, Louisiana)
Hi sureshsonti,
I'm afraid I can't see from the snapshot that the measure shows tomorrow's orders.
1. Is it what you want or what it should be that "Today's Volume will be showing 0 after 7 PM today"?
2. Can you share a dummy sample of the original data?
3. Are there any wrong numbers in your snapshot?
Best Regards,
Dale