Forum Discussion
Anonymous
2 years agoNot applicable
Filter Value Changing from Desktop to Power BI Service
Hello, I have a table that displays activities due today. In the data table, I have a column that marks today with a '1' and the filter works fine in Power BI Desktop. When I uploaded the repor...
Sahir_Maharaj
Super User
2 years agoHello Anonymous,
Can you please try this DAX:
Today Flag =
VAR TodayUTC = TODAY()
VAR LocalTimeOffset = -5 // Example: EST is UTC-5. Adjust this based on your time zone.
VAR AdjustedToday = DATEADD(TodayUTC, LocalTimeOffset, HOUR)
RETURN
IF (
YourTable[YourDateColumn] = AdjustedToday,
1,
0
)
Hope this helps.
Anonymous
2 years agoNot applicable
Hi Sahir,
Thank you for getting back to me. I entered in the DAX formula and there was a 'Parameter is not the correct type' error message for TodayUTC in the AdjustedToday variable. Is that because it is only referencing on day and not a range?
- Anonymous2 years agoNot applicable
Another error I'm receiving says that the last argument of the the DateAdd function has to be Day, Month, Quarter, Year. Will the function still work with Hour?