Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

New Column for Matching Column 2 to Column 1

Column 1 (Project ID) contains repeating values. Column 2 contains a series of values, maximum of 1 of each per project ID (column 1).    I want to add a new column that adds value of "Canceled" w...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

     

    Thank you HotChilli  for the quick response and solution. Here are some of my additions:
    According to your first description, you can create such a calculated column:

    Column 1 = 
    var _a=COUNTAX(FILTER('Table','Table'[project id]=EARLIER('Table'[project id]) && 'Table'[print status]="canceled"),[project id])
    RETURN IF(_a>0,"canceled",[print status])

    Based on your second description, you can create a calculated column like this:

    Column 2 = 
     var _a=COUNTAX(FILTER('Table','Table'[project id]=EARLIER('Table'[project id]) && 'Table'[print status]="canceled"),[project id])
    RETURN IF(_a=BLANK(),BLANK(),[print status])

    Then the result is as follows.

     

    Best Regards,

    Neeko Tang

    If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly.