relative time slicer
1 TopicMeasure to Filter out Values Based on Current Time
I'm working on an operational dashboard to show production by location. When the executive looks at the dashboard in the early morning before store hours, I want them to see yesterday's production numbers. After 9 am, I want them to start seeing today's production. How do I filter based on the current time? Here's the if statement I'm testing: // IF the current hour is before 9 am IF(TIME(HOUR(UTCNOW()), MINUTE(UTCNOW()), SECOND(UTCNOW())) < TIME(9,00,00), // THEN show yesterday's numbers CALCULATE(SUMX(FactTagProduction, [ValueStocked]), DATEADD(FactTagProduction[DateID], -1, Day) ), // ELSE show today's numbers CALCULATE(SUMX(FactTagProduction, [ValueStocked]), FactTagProduction[DateID] = TODAY() ) )Solved1.4KViews0likes4Comments