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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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