Forum Discussion

dattatrayvanti's avatar
dattatrayvanti
Regular Visitor
4 years ago
Solved

Search Formula in Power bi

Dear Team

Requesting you please Help to resolved the Below request ...

 

I am Having Invoice code filed which contain numbers & Text ..in excel i am using formula

 

1) If Invoice Number updated in field ( Text ot Number) Output should be Done
2) If Invoice Number updated as can or cancell or 0 Output should be Cancell
3) If Invoice field is Blank Output should be Not Deliverd
 
Invoice NoFulfillment Type
1008IF(ISBLANK(AE3),"NOT DELIVERED",IF(Number=0,"CANCEL",IF(ISNUMBER(SEARCH("can",Number)),"CANCEL","DONE")))
 NOT DELIVERED
canCANCEL

 

 

2 Replies

  • ddpl's avatar
    ddpl
    Icon for Solution Sage rankSolution Sage

    dattatrayvanti ,

     

    Create a calculated column as per below,

     

    Fulfillment Type = 

    SWITCH(TRUE(),
        'Table'[Invoice No.]=BLANK(), "Not Delivered",
        'Table'[Invoice No.] in {"can", "cancel", 0}, "Cancel",
        "Done")
    • AlexisOlson's avatar
      AlexisOlson
      Icon for Super User rankSuper User

      Pedantic note:

      I'd recommend avoiding the X = BLANK() construction in DAX since 0 = BLANK() returns true.

       

      The alternatives are ISBLANK ( X ) or X == BLANK().