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
amitchandak
6 years agoSuper User
Your date might have timestamp
Is Today = if([date].date=Today(), "Yes", "No")
use .date
Appreciate your Kudos.
Anonymous
6 years agoNot applicable
Hi,
Thanks for the response, it does not seem to like that:
- MartynRamsden6 years agoSolution Sage
Hi Anonymous
Try this:
Is Today = IF( Query2[new_ResolvedOn] = TRUNC( TODAY() ), "Yes", "No" )Best regards,
Martyn- Anonymous6 years agoNot applicable
That did not work sorry, still getting the same issue, still not labelling correctly even when the dates are the same.
- az386 years agoCommunity Champion
Hi Anonymous
try
Is Today = if(DATE(YEAR([date]), MONTH([date]), DAY([date])) = Today(), "Yes", "No")or the overcoded option
Is Today = if(DATE(YEAR([date]), MONTH([date]), DAY([date])) = DATE(YEAR(Today()), MONTH(Today()), DAY(Today())) , "Yes", "No")