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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Create new column in table

Hi everyone, trying to add a new column to a table and populate it with yes or no based on the data from the selected column. 

 

There are many duplicates in the name column and if any of the names have a yes in the selected column I want a yes to be populated in all cells in the new column. 

 

For examble Apple appears 3 times in name column with 2 yes and 1 no in selected column, in the new column I want to see all entries for apple say yes. 

 

Grape appears 2 times in name column with 0 yes and 2 no in selected column, in the new column I want to see all entries for grape say no. 

 

NameSelectedNew column
Apple

Yes

 
Banana

Yes

 
GrapeNo 
AppleNo 
AppleYes 
BananaNo 
GrapeNo 

 

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@Anonymous 

is this what you want?

Column = if(CALCULATE(COUNTROWS(Table2),FILTER('Table2',Table2[Name]=EARLIER(Table2[Name])&&Table2[Selected]="Yes"))>0,"Yes","No")

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
ryan_mayu
Super User
Super User

@Anonymous 

is this what you want?

Column = if(CALCULATE(COUNTROWS(Table2),FILTER('Table2',Table2[Name]=EARLIER(Table2[Name])&&Table2[Selected]="Yes"))>0,"Yes","No")

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Hi ryan_mayu, thank you so much for your help this is exactly what I wanted!!

I don't understan the double && but it works 🙂

@Anonymous 

you are welcome, && is the same as AND in excel and || is the same as OR in excel.

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors