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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join 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
Solution Sage
Solution Sage

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
Solution Sage
Solution Sage

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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.