Forum Discussion

cristianml's avatar
cristianml
Post Prodigy
3 years ago
Solved

Invoke Custom Function - Source - Encoding

Hi,

 

Could you help me to translate in human language what the code below is doing ? I have a difference in a PBI that was created by other person and I'm trying to understan what involves the following step:

 

 

 

 

= (Parameter1 as binary) => let
Source = Csv.Document(Parameter1,[Delimiter=",", Columns=12, Encoding=65001, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true])
in
#"Promoted Headers"

 

 

 

 

  • Hi cristianml 

     

    The code creates a column of tables similar to the one below (the column name  is what you define in the custom function) which source files are a CSV, where the delimiter is a comma "," and just the first 12 columns. Then after connecting, promotes the first row as the header. 

    After this, you can either click on the word Table to open up just a single table or click the expand button to combine all tables (if there are more than one row of tables)

     

     

1 Reply

  • Hi cristianml 

     

    The code creates a column of tables similar to the one below (the column name  is what you define in the custom function) which source files are a CSV, where the delimiter is a comma "," and just the first 12 columns. Then after connecting, promotes the first row as the header. 

    After this, you can either click on the word Table to open up just a single table or click the expand button to combine all tables (if there are more than one row of tables)