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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.

Top Solution Authors