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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Date showing format instead of date

Hi there,

 

I've created a dax statement that returns a date given a that a has filtered down to 1 row. However, when it returns, it displays a format rather than an actual date. I'm trying to display this on a card - when use the date as a field on the card alone it displays fine.

DaveMcD_0-1606201232283.png

 

 

Here is the dax code below, any thoughts on what might be wrong?

Disp_DateOrCount_explore = VAR countTitle = count(SharkTankRegister[Title])
RETURN
IF(countTitle=1, MIN(SharkTankRegister[Date Implemented]), countTitle & " Sharktanks Presented")

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , This will become text data type measure, should display date

 

try like

Disp_DateOrCount_explore = VAR countTitle = count(SharkTankRegister[Title])
RETURN
IF(countTitle=1, format(MIN(SharkTankRegister[Date Implemented]),"MM/DD/YYYY"), countTitle & " Sharktanks Presented")

 

change format as per need

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , This will become text data type measure, should display date

 

try like

Disp_DateOrCount_explore = VAR countTitle = count(SharkTankRegister[Title])
RETURN
IF(countTitle=1, format(MIN(SharkTankRegister[Date Implemented]),"MM/DD/YYYY"), countTitle & " Sharktanks Presented")

 

change format as per need

Anonymous
Not applicable

Solved! Using FORMAT() function seems to fix it

 

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.