Power Query mystery functions - each, _ , error functions

Hi,

This is my first post here. I was looking to get a better understanding of Power Query’s little known functions/ keywords such as _, each, try, and otherwise. I have seen try and otherwise used in error handling scenarios. Are there any other examples of where these are used ?

The power query code =#shared doesn’t list these mysterious functions. This makes me wonder if there are other useful little functions available

Thanks

Hi @masterelaichi,

Welcome to the Forum!

.
You might be interested in the let expression, each keyword, operators, the try expression and the conditional construct if then else

.
Here’s a link to the online documentation. Examples are listed there, so you can just copy and paste those in the Advanced Editor or Formula bar - to explore what they do…

1 Like

Thanks Melissa. Is there video showing how and when these are used ? I find the MS reference docs a bit confusing

In one of your video, you used “_” . From what I understand, this is similar to the each operator but different. Is this correct ?

Not much video content I’m aware of but we’ve started a thread to bring some resources together. You can find that here. I would like to recommend to check out the video by Chris Webb (point 5) great introduction to M.

.
The underscore is a nameless variable in this context. If you create a calculated column within a table, you can use the underscore “_” to reference the current row of the table, which means the current record.

I hope this is helpful.

Easy example of Try…Otherwise

Hi @masterelaichi

I have found the content as an easy demostration of Try…otherwise formula in power query.

Let me know if you find it helpful :grinning:

Regards