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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
tomshaw83
Helper I
Helper I

Index Column & Fill Down

Hello,

I am trying to fill down with a repeating index column as below. I know how to do the 2 things independently (insert an index column, and fill down) but become unstuck when I want to do them together.

 

What I haveWhat I want
1 
 1
 2
 3
 4
1 
 1
 2
 3
 4
1 
 1
 2
 3
 4

 

 

Any help would be appreciated


Thank you

1 ACCEPTED SOLUTION
mussaenda
Super User
Super User

Hi @tomshaw83 ,

 

You can group you data according hoe you want the index to filldown,

the before expanding the columns, add a column, Table.AddIndexColumn( [ColumnName], "IndexperCategory")

 

You can refer to the code below

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlSK1cFGJuEgk7GRsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
    #"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 1, 1, Int64.Type),
    #"Grouped Rows" = Table.Group(#"Added Index", {"Column1"}, {{"Count", each _, type table [Column1=nullable text, Index=number]}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each Table.AddIndexColumn([Count], "IndexperCategory", 1)),
    #"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"Index", "IndexperCategory"}, {"Index", "IndexperCategory"})
in
    #"Expanded Custom"

 Hope this helps!

View solution in original post

2 REPLIES 2
tomshaw83
Helper I
Helper I

Thank you

mussaenda
Super User
Super User

Hi @tomshaw83 ,

 

You can group you data according hoe you want the index to filldown,

the before expanding the columns, add a column, Table.AddIndexColumn( [ColumnName], "IndexperCategory")

 

You can refer to the code below

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlSK1cFGJuEgk7GRsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
    #"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 1, 1, Int64.Type),
    #"Grouped Rows" = Table.Group(#"Added Index", {"Column1"}, {{"Count", each _, type table [Column1=nullable text, Index=number]}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each Table.AddIndexColumn([Count], "IndexperCategory", 1)),
    #"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"Index", "IndexperCategory"}, {"Index", "IndexperCategory"})
in
    #"Expanded Custom"

 Hope this helps!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.