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

Wrong date format in a card

I have a "last date uppdated" in my dashboard in a Card.

This is how the date gets in to my data:

[Last updated ] = "Last updated: " & FIRSTDATE('Last Refresh'[Date])

Ive tried to change format in the cell of the date and so on but nothing works.

My card is choosing a long AM-PM american way of showing my date from a excel source.
How do i get it to a YYY.MM.DD 13:00 time format?

1 ACCEPTED SOLUTION

Hi @Anonymous 

You want to wrap the FORMAT around the FIRSTDATE function

[Last updated ] = "Last updated: " & FORMAT(FIRSTDATE('Last Refresh'[Date]), "YYYY.MM.DD hh:mm")

View solution in original post

6 REPLIES 6
jsaunders_zero9
Responsive Resident
Responsive Resident

Try formatting the date using FORMAT()

 

LastUpdated = "Last Updated: " & FORMAT(FIRSTDATE('Table'[Date]), "YYYY.MM.DD hh:mm")

 

Full list of formatting options is here

FORMAT function (DAX) - DAX | Microsoft Docs

Anonymous
Not applicable

I just cant solve where to put that code in my code.
[Last updated ] = "Last updated: " & FIRSTDATE('Last Refresh'[Date])

Hi @Anonymous 

You want to wrap the FORMAT around the FIRSTDATE function

[Last updated ] = "Last updated: " & FORMAT(FIRSTDATE('Last Refresh'[Date]), "YYYY.MM.DD hh:mm")

Anonymous
Not applicable

Edit//
Oh now i saw it, hh mm, doh, big thanks!
----------------------
Thanks mate, i got it to work (sorry for the basic questions but im not use to it yet 🙂

[Senast uppdaterad ] = "Senast uppdaterad: " & Format(FIRSTDATE ('Last Refresh'[Datum]),"mm/dd/yyyy", "en-gb" )

But now i dont get time? Only date.

Trying to se why on the page you linked to. but i dont really see why
Anonymous
Not applicable

Thanks, ill try to get it to work in my code then. Not use to Dax 🙂

Helpful resources

Announcements
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.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

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.