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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
LukeReds
Helper II
Helper II

Use of FillUp and FillDown with parameters

Hi to everyone,

I grouped a table in this way, i am interested to the months, to fill all the cells of the group

= Table.Group(Source, {"Code"}, {{"data", each Table.FillUp(Table.FillDown(_, {"gen","feb"}),{"gen","feb"}), type table}})

This is ok if the number of months is static, but this number increase every month.

I tried to replace both  {"gen","feb"}) in the code above with  a list containing the months in the table titles but, of course, it doesn't funcion (easy things never function, its Murphy law)

each Table.FillUp(Table.FillDown(_, {MonthTitles}),{MonthTitles}), type table}})

 

MohtTitle in this example contains gen, feb then il will contains gen, feb, march and so on

What's the right  code?

 

Thank you in advance

1 ACCEPTED SOLUTION
AlienSx
Super User
Super User

@LukeReds if MonthTitle is the list then don't use curly braces.

Alternatively: create a full list of all possible month titles:

all_months = {"gen", "feb", "march"....} and then find intersection of your column names and this list: 

MonthTitles = List.Intersect({Table.ColumnNames(Source),  all_months})

and then 

Table.FillUp(Table.FillDown(_, MonthTitles), MonthTitles), type table}})

View solution in original post

4 REPLIES 4
LukeReds
Helper II
Helper II

thank you to everyone!

LukeReds
Helper II
Helper II

 you to everyone, i will never understand those crazy curly brackets!!

AlienSx
Super User
Super User

@LukeReds if MonthTitle is the list then don't use curly braces.

Alternatively: create a full list of all possible month titles:

all_months = {"gen", "feb", "march"....} and then find intersection of your column names and this list: 

MonthTitles = List.Intersect({Table.ColumnNames(Source),  all_months})

and then 

Table.FillUp(Table.FillDown(_, MonthTitles), MonthTitles), type table}})

ronrsnfld
Super User
Super User

Table.ColumnNames(_) will return a List of all the column names. Depending on how your table is arranged, you can select just  those columns that contain the month names.

 

For example, if your month columns start at column 3, then something like List.Skip(Table.ColumnNames(_),2) would return a List of just the month columns. And there are other ways to select the month columns if your arrangement is more comples.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors