itsnotaboutthecell

Power Query M - The Fill Down Hierarchies Challenge

Jan 12th, 2019
446
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. /*
  2. Created By: Alex Powers
  3. Website: http://www.itsnotaboutthecell.com
  4. LinkedIn: https://www.linkedin.com/in/alexmpowers/
  5. */
  6.  
  7. let
  8. Source = Web.Page(Web.Contents("https://www.bangkokairportonline.com/flight-status-departures/?fbclid=IwAR1_9FMoBsSaHPLitEdi0rwCSsBGqt0lGFMiPcw3RpXc0IM6NuKi_hoENsA")){0}[Data],
  9. #"Extract Number From Status" = Table.AddColumn(Source, "Status_b", each try Number.From(Text.Remove([Status], {" ", "-", "A".."z"})) otherwise null, type number),
  10. #"Split Column: ( and )" = Table.SplitColumn(#"Extract Number From Status", "To", Splitter.SplitTextByEachDelimiter({"(",")"}, QuoteStyle.Csv, false), {"City", "City Code"}),
  11. #"Changed Type" = Table.TransformColumnTypes(#"Split Column: ( and )",{{"Scheduled", type time}, {"Revised", type time}, {"Flight", type text}, {"Status", type text}})
  12. in
  13. #"Changed Type"
Advertisement
Add Comment
Please, Sign In to add comment