Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Case and or Len formula based on column string values

Hi Experts

 

I am looking to add a second column to my table so if the value in

Column A has http://app.powerbi.com/ in the string at the start replace with Power BI and all other string values in column A to 

"Web link" in column B

  • I think maybe:

     

    IF(SEARCH("http://app.powerbi.com/",[Column],,-1) = 1,"Power BI",[Column])

     

    I'm not entirely clear on requirements. 

3 Replies

  • ImkeF's avatar
    ImkeF
    Icon for Community Champion rankCommunity Champion

    Hi Anonymous 

    In the query editor, add a column with the following formula:

    if Text.StartsWith([ColumnA], "http://app.powerbi.com/") then "Web Link" else [ColumnA])

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    I think maybe:

     

    IF(SEARCH("http://app.powerbi.com/",[Column],,-1) = 1,"Power BI",[Column])

     

    I'm not entirely clear on requirements. 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks Greg. Prefect