Forum Discussion

SkorpionAAM's avatar
SkorpionAAM
Helper V
5 years ago
Solved

if custom column formula using M Language

I have table where i used  this funcation which working fine    if [operation_photo] = "" then "" else "***/1/layers/3633601/features/"&[ogc_fid]&"/"&"operation_photo/"&[operation_photo]&"/"&"?a...
  • v-easonf-msft's avatar
    5 years ago

    Hi, SkorpionAAM 

    Take a try to  change your M code as below:

    = Table.AddColumn(#"Changed Type", "Custom", each if [operation_photo] = "" then "" else if Text.Contains([operation_photo], "https://") then [operation_photo]  else "***/1/layers/3633601/features/"&[ogc_fid]&"/"&"operation_photo/"&[operation_photo]&"/"&"?api_key=***")

    Please check my test pbix file for more details.


    If it doesn't meet your requirement,please feel free to ask.

     

    Best Regards,
    Community Support Team _ Eason