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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

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

@Anonymous , 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

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

4 REPLIES 4
lucas021
New Member

Thanks. It worked for me.

Anonymous
Not applicable

HI @Anonymous,

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

amitchandak
Super User
Super User

@Anonymous , 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

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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