PBI online showing yesterday's date with TODAY()

Hi guys,

I have an odd problem. PBI online showing yesterday’s day with the formula TODAY().

Have a look at the screen shot and you can see the date updated at the top is the 18/6/2022, the dax formula for today is Today = TODAY() and you can see on the left, a column of the date table to show past and future date.

The PBI desktop file shows the correct date, for the formula TODAY() and if I publish online to the workspace, the problem is resolved. The issue is the next day when I update the report via the gateway, today’s date then still shows as yesterday as show above.

Very odd. I have made sure that the time zone is set correctly in the settings and as you can see the “date updated” on the PBI online portal is correct, it seems to be the DAX formula that shows the wrong date, very odd.

As a temporary workaround I am refreshing my PBI desktop file and publishing online every day.

Any ideas on how to resolve?

Thanks,
Tim

@Timmay

This seems odd to me as well.

documentation from SQLBI - Daxguide provides maybe a suggestion.
TODAY - DAX Guide

The result of the TODAY function changes only when the column that contains the formula is refreshed. It is not updated continuously.

So, maybe you could try to manually refresh the visuals in your online report? Would be weird if that’s needed, but if it works it maybe provides insights on how to proceed with solving the issue.

Another way of solving it, is just making a table in Power query with the following query:

let
Date = Date.From(DateTime.LocalNow()),
ToTable = #table(1, {{Date}}),
ChangeName = Table.RenameColumns(ToTable,{{“Column1”, “RefreshDate”}}),
MakeDate = Table.TransformColumnTypes(ChangeName,{{“RefreshDate”, type date}})
in
MakeDate

then you can just use this one in your report instead of the dax measure :slight_smile:

Hope this helps

Kind regards,
Pim Meesters

Hi @Timmay … I think you might be getting caught by the fact that the Power BI Service does all date calculations in UTC, while (obviously) Power BI Desktop does it’s date calculations based on the settings of the local host machine.

Hope it helps.
Greg

1 Like

Yes, this sounds like exactly what is happening.

And there’s even an issue raised with Microsoft about it 5 years ago and still not fixed, sigh.

https://ideas.powerbi.com/ideas/idea/?ideaid=6636c895-418e-4477-9e68-f216c3162015