Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hi community,
I have a doubt and need your help in creating a logic
In the below table I've Status, Plan ID and Plan_name
| Status | Plan ID | Plan_name |
| 1 | 1 | Aircel 1GB Data 15 days |
| 4 | 1 | Aircel 1GB Data 15 days |
| 3 | 1 | Aircel 1GB Data 15 days |
| 8 | 1 | Aircel 1GB Data 15 days |
| 9 | 1 | Aircel 1GB Data 15 days |
| 2 | 2 | Tata 2GB Data 30 days |
| 3 | 2 | Tata 2GB Data 30 days |
| 6 | 2 | Tata 2GB Data 30 days |
| 10 | 2 | Tata 2GB Data 30 days |
| 1 | 3 | Jio 1.5GB 90 days |
| 4 | 3 | Jio 1.5GB 90 days |
| 6 | 3 | Jio 1.5GB 90 days |
| 7 | 3 | Jio 1.5GB 90 days |
I've 3 plans: Aircel 1GB Data 15 days, Tata 2GB Data 30 days and Jio 1.5GB 90 days
and their respective Status and Plan ID's.
I want to exclude those Plan_name in which Status = 3 is there and their values,
For eg: In Aircel 1GB Data 15 days plan, there is Status = 3, as it includes 3 and other Status values too it should not consider this plan. same for Tata 2GB Data 30 days.
Jio 1.5GB 90 days will be considered as there is no 3 value in Status.
Please help.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSAWPHzKLk1BwFQ3cnBZfEkkQFQ1OFlMTKYqVYnWglEyLUGBOhxoIINZZEqDECyoNwCEjCCKbC2ADVNfhVmBFUYWhAWAlQFmSVV2a+gqGeKVCJpQFqsOGWNcMra45bNhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Status = _t, #"Plan ID" = _t, Plan_name = _t]),
#"Grouped Rows" = Table.Group(Source, {"Plan_name"}, {{"Rows", each _, type table [#"Status "=nullable number, Plan ID=nullable number, Plan_name=nullable text]}}),
#"Filtered Rows" = Table.SelectRows(#"Grouped Rows", each (not List.Contains([Rows][Status],"3")))
in
#"Filtered Rows"
How to use this code: Create a new Blank Query. Click on "Advanced Editor". Replace the code in the window with the code provided here. Click "Done".
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 22 | |
| 22 | |
| 18 | |
| 16 | |
| 13 |
| User | Count |
|---|---|
| 63 | |
| 42 | |
| 40 | |
| 40 | |
| 38 |