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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
timward10
Regular Visitor

Text formula

Hi, 

 

I have a text formula that I would use in Excel, however PBI doesn't seem to accept this. I changed it to ISTEXT but you can only use that once, not twice. 

 

= if([Customer Requested Install Date]=blank(),text(EDATE([Close Date],3),"mmm YY"),text([Customer Requested Install Date],"mmm yy"))
 
The syntax for '(' is incorrect. (DAX(if([Customer Requested Install Date]=blank(),text(EDATE([Close Date],3),"mmm YY"),text([Customer Requested Install Date],"mmm yy")))).

 

Can anyone help please? 

 

Thanks

 
1 ACCEPTED SOLUTION
Bibiano_Geraldo
Super User
Super User

Hi @timward10 ,
Power BI use the FORMAT function for this purpose. Additionally, to check for blanks, you use BLANK() or ISBLANK() instead of =blank().


Corrected DAX formula:

Install Date =
IF(
    ISBLANK([Customer Requested Install Date]),
    FORMAT(EDATE([Close Date], 3), "MMM YY"),
    FORMAT([Customer Requested Install Date], "MMM YY")
)
Is this post help you? Please consider to:

Accept as Solution!
Give a Kudo
Follow me on Linkedin

View solution in original post

2 REPLIES 2
Bibiano_Geraldo
Super User
Super User

Hi @timward10 ,
Power BI use the FORMAT function for this purpose. Additionally, to check for blanks, you use BLANK() or ISBLANK() instead of =blank().


Corrected DAX formula:

Install Date =
IF(
    ISBLANK([Customer Requested Install Date]),
    FORMAT(EDATE([Close Date], 3), "MMM YY"),
    FORMAT([Customer Requested Install Date], "MMM YY")
)
Is this post help you? Please consider to:

Accept as Solution!
Give a Kudo
Follow me on Linkedin

Perfect, thanks @Bibiano_Geraldo, great tip on the blanks too. 

 

Thanks again. 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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