Advertisement
itsnotaboutthecell

Power Query M - The Fill Down Hierarchies Challenge

Jan 12th, 2019
397
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. Contact: alexmpowers@itsnotaboutthecell.com
  6. */
  7.  
  8. let
  9. Source = Web.Page(Web.Contents("https://www.bangkokairportonline.com/flight-status-departures/?fbclid=IwAR1_9FMoBsSaHPLitEdi0rwCSsBGqt0lGFMiPcw3RpXc0IM6NuKi_hoENsA")){0}[Data],
  10. #"Extract Number From Status" = Table.AddColumn(Source, "Status_b", each try Number.From(Text.Remove([Status], {" ", "-", "A".."z"})) otherwise null, type number),
  11. #"Split Column: ( and )" = Table.SplitColumn(#"Extract Number From Status", "To", Splitter.SplitTextByEachDelimiter({"(",")"}, QuoteStyle.Csv, false), {"City", "City Code"}),
  12. #"Changed Type" = Table.TransformColumnTypes(#"Split Column: ( and )",{{"Scheduled", type time}, {"Revised", type time}, {"Flight", type text}, {"Status", type text}})
  13. in
  14. #"Changed Type"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement