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
Rup10
Resolver I
Resolver I

Conversion of date (data type) to text through dax expression

Hi,

 

I need to convert from date to text/string format through dax expression/measure and i tried two functions datevalue and format but these arent working.

Below is the measure for your reference : 

Measure = IF(ISBLANK(COUNT(TABLENAME(COLUMNNAME))=0,"CALLS",)),COUNT(TABLE(COLUMN NAME(WHICH IS IN DATE FORMAT))

 

Can someone please help me with this.

Thanks in advance

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Rup10 , date to text is simple

 

format([Date], "YYYY MM DD" )

for also give MMM DDD etc

 

 

refer for the doc

https://docs.microsoft.com/en-us/dax/format-function-dax

View solution in original post

4 REPLIES 4
lucas021
New Member

Thanks. It worked for me.

v-shex-msft
Community Support
Community Support

HI @Rup10,

I think you can try to use the format function will help for text conversion.

In addition, what type of format you wanted? If you are confused about the coding formula, can you please share more detailed information to help us clarify your requirement?

How to Get Your Question Answered Quickly
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
amitchandak
Super User
Super User

@Rup10 , date to text is simple

 

format([Date], "YYYY MM DD" )

for also give MMM DDD etc

 

 

refer for the doc

https://docs.microsoft.com/en-us/dax/format-function-dax

Hi @amitchandak ,

I am trying to create a measure in which i am cusing If condition and i am taking date column as a refernce however its not working for me. 

Can you please suggest anything how can i compare my datecolumn in Measure in IF condition where i cannot use any Min, Max, Selectedvalue function :

 

sol_1.JPG

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.