A Fun Workaround in Power Query

Hi ,

This week’s video is about a simple but powerful idea on how to recreate the SWITCH function in Power Query, even though it doesn’t actually exist there.

If you’ve ever written long, messy nested IF statements in PQ, you know how painful they can get. In this video, I’ll show you how to build a cleaner, scalable setup using lists and variables to mimic SWITCH logic.

It’s a neat little trick that makes your Power Query cleaner, smarter, and easier to maintain. Definitely worth a watch.



Clean up messy IDs in one step

Got inconsistent Employee IDs like 2, 123, and 55566?

Here’s a quick Power Query fix:
"E-" & Text.PadStart(Text.From([Emp ID]), 5, "0")

It standardizes them to a neat format - 
123 → E-00123, 2 → E-00002.

Simple, clean, and instantly better for reporting.


A quick Excel trick

The usual hide/unhide trick is too basic...
But here’s how you can completely hide it so no one can unhide it easily.



Add Dynamic Totals in Power Query

Instead of writing a separate formula for each column, use this simple formula which adds a running total that updates automatically when new columns appear.



Meet Bujor, Nikhil and Philip...

They’ve all been working with Power Query for a while - cleaning data, building reports, doing all the right things.

But the moment they tried solving a slightly tricky problem or wanted to make their queries more robust and dynamic… Power Query just gave up. No button could do what they needed, and every workaround felt like a temporary fix.

That’s exactly why they joined the M Language Course

If you’ve ever felt stuck like that, trying to push Power Query a little further but hitting its limits, I’d love to welcome you to my course and show you how to go beyond those limits to solve even the trickiest data problems.


Crazy to think we’ve known each other since we were 6 and now here we are, turning 40. Time really does fly.


Our Jaipur house all lit up for Diwali, the lights never fail to make it feel festive.


Love this pic. Diwali always brings such warm energy