Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
hi experts,
i have action is combine 10+ sheet table in one Excel, the sheet name is contain "year" info, like the sheet name is "2018". but in the table of sheet is not have year column. so i need extract the sheet name to table's column. i know there expand table will keep the sheet name for every sheet table, BUT , there's some special reason, i need add the column first for every table before expand.
I think there should some M function or expression can do, but i have no idea. could yo help me ? thank you very much!
Solved! Go to Solution.
NewStep=#table(Table.ColumnNames(PreviousStepName),Table.ToList(PreviousStepName,each {_{0},Table.AddColumn(_{1},"Year",(x)=>_{0})}))
Hi daniel, the expression is works well, it solve my problem. thank you very much! u are so powerful .
NewStep=#table(Table.ColumnNames(PreviousStepName),Table.ToList(PreviousStepName,each {_{0},Table.AddColumn(_{1},"Year",(x)=>_{0})}))
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.