Forum Discussion
Anonymous
6 years agoNot applicable
Is Today Column
Hi, I am trying to create a column called Is Today and it isn't pulling through the correct answer on the if query: Is Today = if([date]=Today(), "Yes", "No") It is only pulling through t...
- 6 years ago
hi Anonymous
For your case, that must be that your [Date] column has the different "time" in the same date. or it is a datetime column in edit queries but you just change the datatype in power bi.
For example:
So just use DATE Function to nested in the formula as below:
https://docs.microsoft.com/en-us/dax/date-function-dax
New Is Today = if(DATE(YEAR([date]), MONTH([date]), DAY([date])) = Today(), "Yes", "No")Result:
Regards,
Lin
rajendraongole1
6 years agoSuper User
You should use calculated column in Data view.
DAX has the same syntex as Excel for creating today's date.
=TODAY()
for the Query Editor, Create a new column ans use the below syntax
DateTime.LocalNow()
or try with Now() function.
- Anonymous6 years agoNot applicable
I have created a new column called 'Todays Date', using the belo formula:
Todays Date = NOW()Then I have used the below formula for the IsToday column:IsToday = IF(Query2[new_ResolvedOn]=Query2[Todays Date], 1, 0)I have tried reformatting the resolved on and todays date formats so they are identical dd/mm/yyyy but it still doesn't work despite them matching.