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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Testing the today() function

Hey Friends, 

I've got a dynamic measure that is built around the today function in dax. I want to test to see that it works at different points of the year, example, i want to make sure it'll work on Leap year. 

Is there a way to pass Power BI a date to use in that function for testing purposes? 

 

Thanks!

Edit: I realized I could just pass the actual date (hardcode) I want instead of the today date and see if the rest of the code works. Too many hours at the keyboard 🙂 

1 REPLY 1
harshnathani
Community Champion
Community Champion

hi @Anonymous ,

 

Not sure what you are exactly looking for but you can simply try DateDIFF and see if it works.

 

In EXCEL,

 

In ExcelIn Excel

 

In Power BI

 

In Power BIIn Power BI

 

Results are the same.

 

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

 

 

 

 

 

 

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.