Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi everyone,
I have serveral csv files that I want to transform.
I want to create a function but I m unable to define how I can Unpivot all my files:
The first row contains period of time from column4 to ColumnX (it depends on the csv)
For each csv file, Periods could be different. In this screenshot I have 201401, 201402,... But sometimes I will have 201301,201203....
When in my function, i'm unpivoting The code is :
#"Changed Type1" = Table.TransformColumnTypes(#"Promoted Headers",{{"Column1", Int64.Type}, {"NoClient", Int64.Type}, {"NoProduit", Int64.Type}, {"Values", type text}, {"201401", type text}, {"201402", type text}, {"201403", type text}, {"201404", type text}, {"201405", type text}, {"201406", type text}, {"201407", type text}, {"201408", type text}, {"201409", type text}, {"201410", type text}, {"201411", type text}}),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type1", {"Column1", "NoClient", "NoProduit", "Values"}, "Attribute", "Value")
But when I want to use my function, I have this error : Expressio.error: the column 201401 of the table was not found.
Of course due to periods which are not the same...
I think the solution will be for me to add column 4 to x in the same colum (period) and transpose the column Type ?
Thanks for helping
Solved! Go to Solution.
Perhaps try this for your Promoted Headers:
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
Perhaps try this for your Promoted Headers:
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 58 | |
| 53 | |
| 43 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 123 | |
| 108 | |
| 44 | |
| 32 | |
| 24 |