cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Date Format in DAX Advance Settings before loading data

DAX does not seem to have a date.format.  You can use the Interface but that is AFTER the data is loaded.

I need to send a dynamic date to my json data source string to load data based on today's date.

 

{date.format("yyyy-MM-dd")}

GetTodaysDate = Text.From(Date.LocalNow()),

"05/20/2020"

I need it to be:

"2020-05-20"

 

Does DAX have a Date Format Function?  

How do I convert the date using Text Replace or some other method?

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User V
Super User V

Re: Date Format in DAX Advance Settings before loading data

Hi @landcruiser64 ,

 

Try this one:

 

DateTime.ToText(DateTime.LocalNow(), "yyyy-MM-dd")



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

Proud to be a Super User!



View solution in original post

1 REPLY 1
Highlighted
Super User V
Super User V

Re: Date Format in DAX Advance Settings before loading data

Hi @landcruiser64 ,

 

Try this one:

 

DateTime.ToText(DateTime.LocalNow(), "yyyy-MM-dd")



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

Proud to be a Super User!



View solution in original post

Helpful resources

Announcements
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Don't miss the Power BI Dev Camp this week!

August Community Highlights

Check out a full recap of the month!

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors