RE: Filter on Bots - Y20 Apr 2026 16:20
Gee , I have wasted several hours trying to get power query to run!
It accepts my syntax without a problem "no errors".
But when it executes it compains strings are not text or not a list or not a table and whatever I try it finds fault!
Just now I tried this on AI!
It said it would be treated privately and I wonder if I'd be charged.
Several minutes elapsed and SFA came back other than an option involving FAST which I did not understand!
Eventually I scrolled the page and it had done what I asked and it worked first time!!
My god, programming no longer longer needs programmers - AI is absolutely fabulous!!!
Instruction was ..
"write power query function to split one string of text by "Annual" and filter rows containing "stupid"
Response is ...
let
Source = /* your table here */,
AddSegments = Table.AddColumn(Source, "Segments", each ( (text as nullable text) =>
let
input = if text = null then "" else text,
parts = Text.Split(input, "Annual"),
trimmed = List.Select(List.Transform(parts, each Text.Trim(_)), each _ <> ""),
filtered = List.Select(trimmed, each not Text.Contains(_, "stupid", Comparer.OrdinalIgnoreCase))
in
filtered
)( [TextCol] )),
// Expand list to rows
Expanded = Table.ExpandListColumn(AddSegments, "Segments"),
// Optionally rename column
Renamed = Table.RenameColumns(Expanded, {{"Segments","Segment"}})
in
Renamed
From that I picked the bones out of it to get this!
let
#"HTML Code" = Web.BrowserContents("https://tlouenergy.com/reports/"),
parts = Text.Split(#"HTML Code", "Annual"),
// trim whitespace and remove empty strings
trimmed = List.Select(List.Transform(parts, each Text.Trim(_)), each _ <> ""),
// filter out segments that contain "stupid" (case-insensitive)
filtered = List.Select(trimmed, each not Text.StartsWith(_, "#(tab)"))
in
filtered
Years 2025 down to 2010 with pdf url. Now in one query not two. And from there , 2025 produced this summary! I'm wondering if AI can be instructed to write the full concept of what want? Afaik that code was free of charge!!! And it appeared in seconds when that Fast message appeared! And their "spec" took about a minute and was pretty minimal. After Donkey, this was a high! Kala are in the right place AI is destined for greatness just from this experience.
Column2
Startup of the Lesedi data centre project is imminent.
Gas at Lesedi to be used to power the data centre
Development of a solar power project at Lesedi is advancing.
Planning underway for additional gas appraisal wells to expand production.