Skip to content

Instantly share code, notes, and snippets.

@petermreid
Created October 22, 2015 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petermreid/2f92e320fd5ecc17b2a7 to your computer and use it in GitHub Desktop.
Save petermreid/2f92e320fd5ecc17b2a7 to your computer and use it in GitHub Desktop.
let
Source = Excel.Workbook(File.Contents("C:\Users\PeterReid\OneDrive\Blogs\development\BI\Ashley\currencies.xlsm"), null, true),
Portfolio_Table = Source{[Item="Portfolio",Kind="Table"]}[Data],
#"Changed Type" = Table.TransformColumnTypes(Portfolio_Table,{{"CountryCode", type text}, {"Symbol", type text}, {"Last Trade Price Only", type number}, {"Last Trade Date", type text}}),
#"Removed Other Columns" = Table.SelectColumns(#"Changed Type",{"CountryCode", "Last Trade Price Only"}),
#"Renamed Columns" = Table.RenameColumns(#"Removed Other Columns",{{"Last Trade Price Only", "Rate"}}),
#"Indexed Table" = Table.AddKey( #"Renamed Columns", {"CountryCode"}, true)
in
#"Indexed Table"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment