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

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

Reply
Anonymous
Not applicable

How to make calculated column based on filtered table

Hi,

 

I'm new to Power BI and have a single excel spreadhseet.
I have the code for a filter which I used in a measure to get the number of expected rows and its comes through correctly.

The filtered code is in the format "FILTER(Database,Expression)"

I want to be able to make a calculated column for my data table where every row that is present in the Filtered datatable is shown as 1, else 0.

 

Th current code I used is:

IF(CONTAINS(FILTER(Database,Expression),random_column_name,random_column_name),1, 0)
 
However, that is making every row in the table as 1 instead of just the filtered datatable I expect. Any help is greatly appreciated. Thanks!
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , if you want to display data to reduce, you need to create a measure and use that in the table visual along with other columns

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , if you want to display data to reduce, you need to create a measure and use that in the table visual along with other columns

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thanks for replying, that solved my issue! To anyone else who does not want to show the measure (where measure is the Filter formula) next to the column table in the visual, you can also filter the data table based on the created measure and say 'if measure is equal to 1' and lock the filter.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.