Forum Discussion
Gatwway Data Refresh
- 10 years ago
You can consider adding a calculated column for tagging "Today" or not.
TodayOrNot = IF(Table[Date]=TODAY(),"Today","Not Today")
Then you can create a slicer with this column. Please refer to thread:
http://community.powerbi.com/t5/Desktop/Direct-Query-Today-Date-function/m-p/57208#M23337
Regards,
Not sure I would call that expected behavior but I do not entirely understand how your queries are setup. One of the tricks for displaying "today" in the reports is to have a calculated column in either the query or DAX that essentially a 1 if it is today and a 0 if it is not today. In Power Query you use something like:
if [Date] = DateTime.Date(DateTime.LocalNow()) then 1 else 0
The equivalent in DAX is:
IsTodayDAX = IF([Date] = TODAY(),1,0)
You then set your report filter to only display rows where this column is 1.
Thanks, good tip to know but they dont look to be supported by direct query ?
- v-sihou-msft10 years agoMicrosoft Employee
You can consider adding a calculated column for tagging "Today" or not.
TodayOrNot = IF(Table[Date]=TODAY(),"Today","Not Today")
Then you can create a slicer with this column. Please refer to thread:
http://community.powerbi.com/t5/Desktop/Direct-Query-Today-Date-function/m-p/57208#M23337
Regards,
- SteveM10 years agoRegular Visitor
Thank you :)