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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
ms166
Regular Visitor

Automatic data transformation

Is it possible to program something in Power BI so every time a new data sheet is added to the report, the data can be transformed automatically and someone wouldn't have to do it manually every time?

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

hi @ms166 

if data format is the same on each excel sheet you can easy combine them in Power Query like

et
    Source = Excel.Workbook(File.Contents("C:\file.xlsx"), null, true),
    #"Expanded Data" = Table.ExpandTableColumn(Source, "Data", {"Column1", "Column2", "Column3"}, {"Data.Column1", "Data.Column2", "Data.Column3"})
in
    #"Expanded Data"

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

3 REPLIES 3
az38
Community Champion
Community Champion

hi @ms166 

if data format is the same on each excel sheet you can easy combine them in Power Query like

et
    Source = Excel.Workbook(File.Contents("C:\file.xlsx"), null, true),
    #"Expanded Data" = Table.ExpandTableColumn(Source, "Data", {"Column1", "Column2", "Column3"}, {"Data.Column1", "Data.Column2", "Data.Column3"})
in
    #"Expanded Data"

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
selimovd
Super User
Super User

Hey @ms166 ,

 

can you provide more details?

When new data is appearing it will be transformed automatically. So what exactly is the question?

 

Best regards

Denis

As in, when a new data sheet is inputted, is it possible to automate the removal of rows and columns. This is needed because the Excel version of the data looks different to how it is needed in Power BI.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.