Skip to main content

Power BI

New

Query Editor's Today Button to use DateTime.LocalNow () rather than static date

Vote (2) Share
Greg's profile image

Greg on 12 Jul 2017 01:15:36

Currently in the Query Editor when you do Date/Time transformations/filters there is that button that says "Today" which inserts a static version of today's date. I don't think I've ever wanted to have that date be static, but rather relative to when the report was run. (Ex. I may want it calculate the duration between "Today" and a date to calculate aging, but I've never used the button because I wanted the date hard coded. I suggest either changing that button or having two side by side buttons that say something like Today (static) and Today (dynamic). The dynamic version would use DateTime.LocalNow () as a basis rather than the static date. (Typically when I need to transform or filter based on a static date, it's off a very specific date that is not today but yet is not one of the named metrics.)

Comments (1)
Greg's profile image Profile Picture

c0607ca9 8c30-4c1d-bd80-94db118d54ec on 05 Jul 2020 23:38:25

RE: Query Editor's Today Button to use DateTime.LocalNow () rather than static date

Yeah, the static "Today" is stupid and dangerous to use. Just give us a quick button for DateTime.LocalNow () will be good.