Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi,
How can I expand all the csv format custom table in one go?
Normally below code works for excel contents but it doesn't seem to work with csv files as all values shows null.
Normally use with excel contents
let
// Get list of files in SharePoint folder
Source = SharePoint.Contents("https://XXXX.sharepoint.com/sites/XXX"),
// Get list of files in SharePoint folder
Documents = Source{[Name="Documents"]}[Content],
// Get list of files in SharePoint folder
#"KR Cell Status" = Documents{[Name="KR Cell Status"]}[Content],
// Get list of files in SharePoint folder
#"LGUplus" = #"KR Cell Status"{[Name="LGUplus"]}[Content],
// Get list of files in SharePoint folder
#"5G_DG1" = #"LGUplus"{[Name="5G_DG1"]}[Content],
#"Removed Other Columns" = Table.SelectColumns(#"5G_DG1",{"Content", "Name"}),
#"Sorted Rows" = Table.Sort(#"Removed Other Columns",{{"Name", Order.Descending}}),
#"Kept First Rows1" = Table.FirstN(#"Sorted Rows",5),
#"Added Custom" = Table.AddColumn(#"Kept First Rows1", "Custom", each Csv.Document([Content])),
#"2025_W11_5G_DG1 csv" = #"Added Custom"{[Name="2025_W11_5G_DG1.csv"]}[Custom]
in
#"2025_W11_5G_DG1 csv"
If I clisk Binary:
let
// Get list of files in SharePoint folder
Source = SharePoint.Contents("https://XXX.sharepoint.com/sites/XXX"),
// Get list of files in SharePoint folder
Documents = Source{[Name="Documents"]}[Content],
// Get list of files in SharePoint folder
#"KR Cell Status" = Documents{[Name="KR Cell Status"]}[Content],
// Get list of files in SharePoint folder
#"LGUplus" = #"KR Cell Status"{[Name="LGUplus"]}[Content],
// Get list of files in SharePoint folder
#"5G_DG1" = #"LGUplus"{[Name="5G_DG1"]}[Content],
#"Removed Other Columns" = Table.SelectColumns(#"5G_DG1",{"Content", "Name"}),
#"Sorted Rows" = Table.Sort(#"Removed Other Columns",{{"Name", Order.Descending}}),
#"Kept First Rows1" = Table.FirstN(#"Sorted Rows",5),
#"Added Custom" = Table.AddColumn(#"Kept First Rows1", "Custom", each Csv.Document([Content])),
#"2025_W11_5G_DG1 csv" = #"Added Custom"{[Name="2025_W11_5G_DG1.csv"]}[Content],
#"Imported CSV" = Csv.Document(#"2025_W11_5G_DG1 csv",[Delimiter=",", Columns=54, Encoding=1252, QuoteStyle=QuoteStyle.None])
in
#"Imported CSV"
How csv looks:
Solved! Go to Solution.
Hi @Anonymous
Use Csv.Document function. Sample code
Table.PromoteHeaders( Csv.Document([Content], [Delimiter=",", Encoding=1252, QuoteStyle=QuoteStyle.Csv]), [PromoteAllScalars = true])
[Content] refers to the binary column
Since your colum header is not in row 1, you will need to skip a row before applying Table.PromoteHeaders
Table.PromoteHeaders( Table.Skip( Csv.Document([Content], [Delimiter=",", Encoding=1252, QuoteStyle=QuoteStyle.Csv]), 1), [PromoteAllScalars = true])
Hi @Anonymous
Use Csv.Document function. Sample code
Table.PromoteHeaders( Csv.Document([Content], [Delimiter=",", Encoding=1252, QuoteStyle=QuoteStyle.Csv]), [PromoteAllScalars = true])
[Content] refers to the binary column
Since your colum header is not in row 1, you will need to skip a row before applying Table.PromoteHeaders
Table.PromoteHeaders( Table.Skip( Csv.Document([Content], [Delimiter=",", Encoding=1252, QuoteStyle=QuoteStyle.Csv]), 1), [PromoteAllScalars = true])
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 44 | |
| 43 | |
| 38 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 67 | |
| 63 | |
| 30 | |
| 30 | |
| 23 |