Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
fabio7xavier
Frequent Visitor

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 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

Hi @fabio7xavier 

try a calculated column

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

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

1 REPLY 1
az38
Community Champion
Community Champion

Hi @fabio7xavier 

try a calculated column

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

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.