Forum Discussion

fabio7xavier's avatar
fabio7xavier
Frequent Visitor
6 years ago
Solved

New column based on multiple column values

I have a table like this

Field 1Field 2Field 3
101030
303010
10null30
103010
303030

 

And I would like to generate a new column that will count how many '30' exists in each row.

For this example, the result would be:

Field 1Field 2Field 3Counter
1010301
3030102
10null301
1030101
3030303

 

What is the best solution for this?
It will be easier to do this from DAX or by creating an advanced query.

 

Thank you!

1 Reply

  • az38's avatar
    az38
    Community Champion

    Hi fabio7xavier 

    try a calculated column

    Counter= ([Field 1]=30)+([Field 2]=30)+([Field 3]=30)