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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.