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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Custom Column with Ifs/And statement

Hi - I'm new to BI and trying to figure out the best way to create the below  custom column in an existing report.

 

Looking to return 'accept' in the new column if each Col A/B/C contain any of the values provided in Col1/2/3, respectively. All rows not meeting this criteria would simply return 'other' in the new column.

 

So for each row, If ColA contains one of the values provided in Col1, AND ColB contains one of the values provided in Col2, AND ColC contains one of the values provided in Col3, then Return 'accept' in the custom colum

 

thank you!

 

 Report 1    Report 2 
Col ACol BCol CCustom Col Col 1Col 2Col 3
5orangexPass 1applex
2appleyAccept 2bananay
19kiwizPass 3kiwiz
5bananayAccept 4  
4applezAccept 5  
1kiwioPass    
3grapepPass    
2grapeyAccept    
1 ACCEPTED SOLUTION
v-gizhi-msft
Community Support
Community Support

Hi,

 

Please try this measure:

Measure = IF(MAX(Report1[Col A]) in FILTERS(Report2[Col 1])&&MAX(Report1[Col B]) in FILTERS(Report2[Col 2])&&MAX(Report1[Col C]) in FILTERS(Report2[Col 3]),"Accept","Pass")

And the result shows:

31.PNG

Hope this helps.

 

Best Regards,

Giotto Zhi

View solution in original post

1 REPLY 1
v-gizhi-msft
Community Support
Community Support

Hi,

 

Please try this measure:

Measure = IF(MAX(Report1[Col A]) in FILTERS(Report2[Col 1])&&MAX(Report1[Col B]) in FILTERS(Report2[Col 2])&&MAX(Report1[Col C]) in FILTERS(Report2[Col 3]),"Accept","Pass")

And the result shows:

31.PNG

Hope this helps.

 

Best Regards,

Giotto Zhi

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.