Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not 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 the result as No even though there are multiple dates which match todays date.

 

Any help would be appreciated.

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

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:

2.JPG

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:

3.JPG

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

9 REPLIES 9
v-lili6-msft
Community Support
Community Support

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:

2.JPG

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:

3.JPG

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

Your date might have timestamp

Is Today = if([date].date=Today(), "Yes", "No")

use .date

Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi,

 

Thanks for the response, it does not seem to like that:

 

istoday issue 2.JPG

Hi @Anonymous 

 

Try this:

Is Today = IF( Query2[new_ResolvedOn] = TRUNC( TODAY() ), "Yes", "No" )

 

Best regards,
Martyn

Anonymous
Not applicable

That did not work sorry, still getting the same issue, still not labelling correctly even when the dates are the same.

@Anonymous 

 

Sorry, I missed a TRUNC() from the column name. It should have been:

Is Today = IF( TRUNC( Query2[new_ResolvedOn] ) = TRUNC( TODAY() ), "Yes", "No" )

 

Most of the solutions suggested above would work in normal circumstances.

If you still don't have any luck, please share you pbix so we can investigate further.

 

Best regards,
Martyn

az38
Community Champion
Community 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")

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
rajendraongole1
Super User
Super 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.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Anonymous
Not 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.
 
istoday issue.JPG
 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.