Reply
timward10
Helper II
Helper II
Partially syndicated - Outbound

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

Syndicated - Outbound

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")
)

View solution in original post

2 REPLIES 2
Bibiano_Geraldo
Super User
Super User

Syndicated - Outbound

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")
)

Syndicated - Outbound

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

 

Thanks again. 

avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)