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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
KrisMoens
New Member

Copy hedader by each new date

the excel contains always 3 dates, I want the header to return per date
I can manage to insert an empty row per car per date
but copying the header does not work
in attachment small example where column H to K is the desired one

hulp.png

 

let
    Bron = Excel.CurrentWorkbook(){[Name="Tabel1"]}[Content],
    #"Type gewijzigd" = Table.TransformColumnTypes(Bron,{{"datum", type date}, {"wagen", type text}, {"omschrijving", type text}, {"chauffeur", type text}}),
    Samen = Table.AddColumn(#"Type gewijzigd", "Samengevoegd", each Text.Combine({Text.From([datum], "nl-BE"), [wagen]}, " "), type text),
    cols = Table.ColumnNames(Samen),
    grp = Table.Group(Samen, {"Samengevoegd"}, {{"Count", each Table.InsertRows(_,Table.RowCount(_), {Record.FromList(List.Repeat({null},Table.ColumnCount(_)),cols)} )}}),
    delCol = Table.RemoveColumns(grp,{"Samengevoegd"}),
    Toe_leeg = Table.ExpandTableColumn(delCol, "Count", cols, cols),
    Kol_verw = Table.RemoveColumns(Toe_leeg,{"Samengevoegd"})
in
    Kol_verw

 

 

 

1 ACCEPTED SOLUTION
dufoq3
Super User
Super User

Hi @KrisMoens, I recommend you to read about Freeze Panes in Excel - I believe this will solve your issue.

 

dufoq3_0-1712068554287.png

 


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

1 REPLY 1
dufoq3
Super User
Super User

Hi @KrisMoens, I recommend you to read about Freeze Panes in Excel - I believe this will solve your issue.

 

dufoq3_0-1712068554287.png

 


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

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors
Top Kudoed Authors