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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
arkiboys2
Helper IV
Helper IV

dataflow filter

in dataflow of fabric datafactory I am transforming data...

one of the columns, state, at present only has 'completed' and 'planned'

if in future there is also 'deleted' state, then I want to make sure no row is ingested for:

state = 'deleted' or state = 'planned'

how do I do this?

at present in th edrop down of the state column I can only un-check 'planned' but what about 'deleted' state which is not present currently?

I want to safe-gaurd for 'deleted' state if it comes in future.

thank you

1 ACCEPTED SOLUTION
frithjof_v
Super User
Super User

This method only keeps the "completed" state:

let
  Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WysgvKk5VAAElHSUQ5eFfFOwKZCfn5xbkpJakpijF6kQrJSeWwBQBmcVAqiAnMS8PKuuSnw7V7eLvrgBTiKzC2TEEKAIhUU328A8C2we2Gsgsxqo/LSe/PLUIKOjm4x+eWoSpJhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [column2 = _t, column7 = _t, state = _t]),
  #"Filtered rows" = Table.SelectRows(Source, each ([state] = "completed"))
in
  #"Filtered rows"

 

This method explicitly excludes the "planned" and "deleted" states:

let
  Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WysgvKk5VAAElHSUQ5eFfFOwKZCfn5xbkpJakpijF6kQrJSeWwBQBmcVAqiAnMS8PKuuSnw7V7eLvrgBTiKzC2TEEKAIhUU328A8C2we2Gsgsxqo/LSe/PLUIKOjm4x+eWoSpJhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [column2 = _t, column7 = _t, state = _t]),
  #"Filtered rows" = Table.SelectRows(Source, each ([state] <> "planned" and [state] <> "deleted"))
in
  #"Filtered rows"

 

Which filtering logic applies best in your case?

View solution in original post

2 REPLIES 2
frithjof_v
Super User
Super User

This method only keeps the "completed" state:

let
  Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WysgvKk5VAAElHSUQ5eFfFOwKZCfn5xbkpJakpijF6kQrJSeWwBQBmcVAqiAnMS8PKuuSnw7V7eLvrgBTiKzC2TEEKAIhUU328A8C2we2Gsgsxqo/LSe/PLUIKOjm4x+eWoSpJhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [column2 = _t, column7 = _t, state = _t]),
  #"Filtered rows" = Table.SelectRows(Source, each ([state] = "completed"))
in
  #"Filtered rows"

 

This method explicitly excludes the "planned" and "deleted" states:

let
  Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WysgvKk5VAAElHSUQ5eFfFOwKZCfn5xbkpJakpijF6kQrJSeWwBQBmcVAqiAnMS8PKuuSnw7V7eLvrgBTiKzC2TEEKAIhUU328A8C2we2Gsgsxqo/LSe/PLUIKOjm4x+eWoSpJhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [column2 = _t, column7 = _t, state = _t]),
  #"Filtered rows" = Table.SelectRows(Source, each ([state] <> "planned" and [state] <> "deleted"))
in
  #"Filtered rows"

 

Which filtering logic applies best in your case?

frithjof_v
Super User
Super User

You need to manually edit the M code.

 

Advanced Editor is useful for this.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Fabric Update Carousel

Fabric Monthly Update - October 2025

Check out the October 2025 Fabric update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.