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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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