March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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.
ID | Type | Attribute | Value |
22 | Member | SEC | Family |
48 | Member | SEC | Single |
48 | Child | SEC | Single |
48 | Spouse | SEC | Single |
51 | Member | EH | Family |
51 | Child | EH | Family |
51 | Spouse | EH | Family |
55 | Member | EH | Single |
Thanks,
Solved! Go to Solution.
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.
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
This should filter your table as per your requirements. Let me know if you have any other requirements!
Proud to be a Super User! Regards, Bipin Lala | Business Intelligence Developer | |
Hi @AbhinavJoshi ,
I create a table as you mentioned.
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" )
)
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.
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.
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
This should filter your table as per your requirements. Let me know if you have any other requirements!
Proud to be a Super User! Regards, Bipin Lala | Business Intelligence Developer | |
That's good!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
126 | |
79 | |
60 | |
58 | |
44 |
User | Count |
---|---|
181 | |
121 | |
82 | |
70 | |
54 |