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! Learn more

Reply
YehudaBI
New Member

Filtering a column that created from two columns?

Hi Community,

I have a column (XY FILE) that I made by adding two columns (X file + Y file).

I want to filter that column by X file or Y file, but when I do that it filters it wrong.

 

X file  | Y file XY file

   1           1          2

    1          0          1

   0           1          0

 

If I'm filtering by X files it will show me 3 but the correct answer is 2 cause I have only two X files.

which formula should I use?

 

Thank you 🙂

4 REPLIES 4
VahidDM
Super User
Super User

Hi @YehudaBI 

 

If there are only 1 and 0 in X and Y file columns, try this measure:

Measure = countrows(table)

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

Hi VahidDM,

Maybe I didn't explain myself right.

I Have another Column that I'm filtering X or Y with it.

I need a measure that:

- If nothing is Filtered: it sums the XY file column

- if X file is filtered: it sums just the X file column

- if Y file is filtered: it sums just the Y file column

 

I hope this time I explained myself well.

Thank you!

amitchandak
Super User
Super User

@YehudaBI , what do mean by filter by X file

Are you trying a measure like

countrows(filter(Table, Table[X file] <> 0 ))

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

Hi  Amitchandak,

Maybe I didn't explain myself right.

I Have another Column that I'm filtering X or Y with it.

I need a measure that:

- If nothing is Filtered: it sums the XY file column

- if X file is filtered: it sums just the X file column

- if Y file is filtered: it sums just the Y file column

 

I hope this time I explained myself well.

Thank you!

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.