I’ve solved the mystery of poltergeists. It’s just #ADHD short-term memory fails and “blindness”…
“I swear, I JUST looked there!”
I’ve solved the mystery of poltergeists. It’s just #ADHD short-term memory fails and “blindness”…
“I swear, I JUST looked there!”
All the windows are open. Watching horror movies with the subtitles on so the screaming doesn’t bother the neighbours 😂
Turns out my 11-yo daughter has developed a love of disaster movies. Go figure?
Yeah, I agree, what he said.
When you want to make friends but get told off…
Shout out to all the people that complained about Google
Well, that’s interesting!
I had an interesting problem recently when the JSON output from an API started to return a null value instead of empty list. This broke my PowerQuery so I wanted to share a fix.
Originally, I used the built-in “Extract values (from a list)” feature, which concatenated them to make comma separated values:
= Table.TransformColumns(#"Removed Columns", {"List_Field", each Text.Combine(List.Transform(_, Text.From), ","), type text})
And that worked fine. Until the content of that field was not a list. Evidently, this field had previously contained an empty JSON list if it contained no values. I’ve never looked at the JSON itself so I had no idea. So, when the API started returning null for that field instead List.Transform failed:
Expression.Error: We cannot convert the value null to type List.
In some of my other Queries it was also failing “silently” because this step was immediately followed by a RemoveRowsWithErrors step. Whoops. Having no idea that the API output had changed (or what it originally contained) was my big problem here. Took me a while to understand what had gone wrong and how.
The fix itself isn’t complex, simply check if the value is a list before concatenation:
= Table.TransformColumns(#"Removed Columns", {"List_Field", each if Value.Is(_, type list) then Text.Combine(List.Transform(_, Text.From), ",") else null, type text})
However, that DOES make me wonder why the built-in doesn’t automatically add code to check the type. Can’t be that hard…
“Do that with Acrobat”
I can’t even view a PDF, Adobe. WTF have you done? Morons.
“There always a man and an ent in permanent”
Spelling hacks with #Tolkien