Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Try this if Columm doesn t otherwise if columm doesn t exist do that

Hi, I need help with a formula that replace null values to 0 if colum A and B exists , but often the columm B does not exist when  I do a columm to lines transformation. how would it be do write the try and otherwise to a columm that doesn t exists? I need this check at the begginning of the code because I have a lot of other code lines that need to know if the columm exists.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    can you upload a sample?

    • Anonymous's avatar
      Anonymous
      Not applicable

       

       

      Initial table

       

      Sum in power query

       

      Initial table with Delivery

        
        If I update a table without Delivery it doenst show The collum Delivery , and then the calculation gives a error because the columm Delivery does not exists