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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
naveen_chander
New Member

Fill down on conditions without loosing data from table

I have below table with number upto 8 in "Control" column

 

naveen_chander_0-1710386357453.png

i want to filter for 7 and 8 here and then want to use fill down option in column CT but when i do it i lost other rows from the table. Please suggest how data can be added with fill down option in column CT after filtering 7 and 8 and without loosing other rows in table

 

naveen_chander_1-1710386629280.png

 

 

2 ACCEPTED SOLUTIONS
m_dekorte
Super User
Super User

Hi @naveen_chander,

 

You can split your table, let's assume the variable containing your table is called: Source

Filter your table on rows to exclude from the fill operation, if that is a number it looks like this:

= Table.SelectRows( Source, each ([Control] < 7))

 

Copy the syntax visible inside the formula bar.

Press the fx in front of the formula bar, this creates a manual step.

Select the #"Selected Rows" step that was returned (I will refer to it like this but it could be named differently)

And paste the syntax you had copied, make a small modification:

= Table.SelectRows( Source, each ([Control] = 7 or [Control] = 9 ))

 

Perform fill operations and so on....

 

To bring back the rows where Control <7, insert a manual step: I will presume this returns a variable named: Result

Append the #"Selected Rows" table like so:

= Result & #"Selected Rows"

 

I hope this is helpful

View solution in original post

dufoq3
Super User
Super User

Hi @naveen_chander, you can use simple condition:

 

Result

dufoq3_1-1710683984011.png

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTJUitWJVnICsizALGcgywzMAsmaw2VNwSwXuKwrkGUJZrnB9brD1YFkTcCsACDLCK4XoQ5hCsSOECDLWCk2FgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [CT = _t, Control = _t]),
    ChangedType = Table.TransformColumnTypes(Source,{{"Control", Int64.Type}}),
    Ad_NewCT = Table.AddColumn(ChangedType, "New CT", each if List.Contains({7,8}, [Control]) then [CT] else null, type text),
    FilledDownNewCT = Table.FillDown(Ad_NewCT,{"New CT"})
in
    FilledDownNewCT

 


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

View solution in original post

2 REPLIES 2
dufoq3
Super User
Super User

Hi @naveen_chander, you can use simple condition:

 

Result

dufoq3_1-1710683984011.png

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTJUitWJVnICsizALGcgywzMAsmaw2VNwSwXuKwrkGUJZrnB9brD1YFkTcCsACDLCK4XoQ5hCsSOECDLWCk2FgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [CT = _t, Control = _t]),
    ChangedType = Table.TransformColumnTypes(Source,{{"Control", Int64.Type}}),
    Ad_NewCT = Table.AddColumn(ChangedType, "New CT", each if List.Contains({7,8}, [Control]) then [CT] else null, type text),
    FilledDownNewCT = Table.FillDown(Ad_NewCT,{"New CT"})
in
    FilledDownNewCT

 


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

m_dekorte
Super User
Super User

Hi @naveen_chander,

 

You can split your table, let's assume the variable containing your table is called: Source

Filter your table on rows to exclude from the fill operation, if that is a number it looks like this:

= Table.SelectRows( Source, each ([Control] < 7))

 

Copy the syntax visible inside the formula bar.

Press the fx in front of the formula bar, this creates a manual step.

Select the #"Selected Rows" step that was returned (I will refer to it like this but it could be named differently)

And paste the syntax you had copied, make a small modification:

= Table.SelectRows( Source, each ([Control] = 7 or [Control] = 9 ))

 

Perform fill operations and so on....

 

To bring back the rows where Control <7, insert a manual step: I will presume this returns a variable named: Result

Append the #"Selected Rows" table like so:

= Result & #"Selected Rows"

 

I hope this is helpful

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI 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.