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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
mevans
Frequent Visitor

calculated column that is based on two IF statements

I have three columns that I need to base a new calculated column on where I need to return a value based on two IF statments, one that uses a date and one that finds a particular text within a string.

 

My columns are Date of Sales, Notes.1.1 (this is a date field corresponding to when a customer has called in to customer service), and Notes.2 (this is a text string of user inputted notes)

 

What I'm trying to do is the following calculated column but am not geting the value passed.

 

Customer Cancel =

 

IF(fSales[Notes.1.1]=fSales[Date of Sale]

   && IF(ISBLANK(SEARCH("Cancelled",fSales[Notes.2])),1,BLANK()),

1,BLANK())

 

I'm sure this isn't right. Any help would be appreciated.

1 ACCEPTED SOLUTION
Sean
Community Champion
Community Champion

This should give you 1 if they ordered and then called to cancel the same day (that's basically how I read your question)

 

Customer Cancel Column = 
IF (
    fSales[Date of Sale] = fSales[Notes.1.1],
    IF (
        ISBLANK ( SEARCH ( "Cancelled", fSales[Notes.2], 1, BLANK () ) ),
        BLANK (),
        1
    ),
    BLANK ()
)

View solution in original post

2 REPLIES 2
Sean
Community Champion
Community Champion

This should give you 1 if they ordered and then called to cancel the same day (that's basically how I read your question)

 

Customer Cancel Column = 
IF (
    fSales[Date of Sale] = fSales[Notes.1.1],
    IF (
        ISBLANK ( SEARCH ( "Cancelled", fSales[Notes.2], 1, BLANK () ) ),
        BLANK (),
        1
    ),
    BLANK ()
)
mevans
Frequent Visitor

Thanks Sean!

 

That totally worked. Now what if I also wanted to include variations on the spelling of "Cancelled"? Such as Cancel, cncl, cncld.

 

Is that even possible?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors