4 Replies Latest reply on Mar 1, 2018 6:03 AM by Jim Dehner

    compare 2 fields and replace value if matching

    Patrick Weber

      Hi Tableau friends, how I can compare to columns in a calculated field?

      See my example workbook: The table product has on its description column the record 'zzz' this is a place holder. On the table salesreport there is a column called 'additional_desc'.


      Now I want to use this condition:

      If salesreport.additinal_desc = product.description then show product.description

      if both fields don't have the same value then just show salesreport.additinal_desc


      I tried

      iif ([additinal_desc] = [description], [description], [additinal_desc) 


      But it's not working properly.


      Thanks for any suggestions.