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
AbhinavJoshi
Responsive Resident
Responsive Resident

Advance Filtering

Hi Everyone, 

I have the following dataset, and I would like to remove the rows where the Type is Child & Spouse and the Value is Single. 

 

IDTypeAttributeValue
22MemberSECFamily
48MemberSECSingle
48ChildSECSingle
48SpouseSECSingle
51MemberEHFamily
51ChildEHFamily
51SpouseEHFamily
55MemberEHSingle

 

Thanks,

1 ACCEPTED SOLUTION
Bipin-Lala
Super User
Super User

Hi @AbhinavJoshi,

 

You can create a custom column in Query Editor, let's say "FilterRows" and assign a value to it (like 0) if it matches your conditions for filtering out the rows.

BipinLala_0-1712271562671.png

if ([Type] = "Child" or [Type] = "Spouse") and [Value] = "Single" 
then 0 
else 1

Now, FilterRows = 0 for all rows that match your conditions, otherwise it's 1

 

In the next step, you can filter out all rows where FilterRows = 0

BipinLala_1-1712271684532.png

 

This should filter your table as per your requirements. Let me know if you have any other requirements!

 




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

Proud to be a Super User!


Regards,

Bipin Lala | Business Intelligence Developer



View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @AbhinavJoshi ,

I create a table as you mentioned.

vyilongmsft_0-1712283094119.png

Then I create a new table and here is the DAX code.

Table 2 =
FILTER (
    'Table',
    NOT ( ( 'Table'[Type] = "Child"
        || 'Table'[Type] = "Spouse" )
        && 'Table'[Value] = "Single" )
)

vyilongmsft_1-1712283236550.png

 

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Bipin-Lala
Super User
Super User

Hi @AbhinavJoshi,

 

You can create a custom column in Query Editor, let's say "FilterRows" and assign a value to it (like 0) if it matches your conditions for filtering out the rows.

BipinLala_0-1712271562671.png

if ([Type] = "Child" or [Type] = "Spouse") and [Value] = "Single" 
then 0 
else 1

Now, FilterRows = 0 for all rows that match your conditions, otherwise it's 1

 

In the next step, you can filter out all rows where FilterRows = 0

BipinLala_1-1712271684532.png

 

This should filter your table as per your requirements. Let me know if you have any other requirements!

 




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

Proud to be a Super User!


Regards,

Bipin Lala | Business Intelligence Developer



That's good!

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.

Top Solution Authors