Here's an alternative function to determine the embedded error message: = Table.AddColumn(Source, "NewPrice", each try [Price] catch(err) => if err[Message.Parameters]{0} = "#DIV/0!" then 10 else if err[Message.Parameters]{0} = "#N/A" then 5 else 0)
hi chandeep it is very helpful video.... one more thing I an struggling with the direct query these days can you please help me to solve this issue.... I am unable to do transformations and merging, filtering in power query.
It is awesome content. 👌 Sir if you can explain DAX bit advance level it will be good. I have raise one query from many power bi experts and Dax champ no one come back with appropriate solution. In future video could you pls explain running total by category and by month both together. Means in each month like Jan ,feb ....etc i can calculate running total of all orders of all products.
Mine acts weird. When I use try I only get FALSE with a error in the window saying "DataFormat.Error Invalid Cell value "#N/A". I am seriously struggling to find this error, I have a table with a million rows and it stops the whole query. I cant even use a blanket remove error it still says dataformat.
@@GoodlyChandeep Of course! It’s nice to see someone else making excel puns and asking the *real* questions. Haha Any chance there’s a way to do find and replace in the advanced editor? Right now I’m copying / pasting the code into MSFT Word to edit, then pasting it back. Maybe it’s something that won’t be as much of an issue as my M Code improves.
I am trying to use try otherwise and if then with two arguments, but it doesn't work (with two merges), any idea how to do two merges in the same step ? the argument =try Table.ExpandTableColumn(#"Merged Queries1", "Table1", {"A", "B"})otherwise Table.ExpandTableColumn(#"Merged Queries1", "Table3", {"A", "B"})
Hopefully youtube doesn't break the formatting. here's what you want = try Table.ExpandTableColumn(#"Merged Queries1", "Table1", {"A", "B"}) catch (e) => Table.ExpandTableColumn(#"Merged Queries1", "Table3", {"A", "B"}) try `otherwise` is the old format, you lose any potential error information, or that there even was an error.
Check out our newly launched M Language course ↗ - goodly.co.in/learn-m-powerquery/
Here's an alternative function to determine the embedded error message:
= Table.AddColumn(Source, "NewPrice", each try [Price]
catch(err) =>
if err[Message.Parameters]{0} = "#DIV/0!" then 10
else
if err[Message.Parameters]{0} = "#N/A" then 5
else 0)
You are always very good at addressing the issues straight to their points in a very clear way.
Oh my word I’m blown away - so efficient compared to how I was accomplishing this before
Great video Chandeep!
Didn’t know Message.Format and Message.Parameters made it to Excel 😜
Thanks for sharing!
Glad you like it 💚
Crystal clear explanation and great additional recommended resources. Thanks, Chandeep!
Being a newbi its a great lesson... Thanks mate!!
Happy to help!
Thanks Chandeep for the clear explanation of try catch and the link to the MS documentation for it!
Glad you like it! 💚
This is so helpful. Thank you Chandeep!
Glad it was helpful 💚
Very well explained👏
Thanks for sharing Chandeep!
Glad you like it 💚
Wow! Just WoW! I have a feeling there’s going to be more bennies coming out of this feature.
Brilliant content as always Chandeep 👍👍👍👍👍👍
Thank You 😊💚
hi chandeep it is very helpful video....
one more thing I an struggling with the direct query these days can you please help me to solve this issue....
I am unable to do transformations and merging, filtering in power query.
Wow! Great stuff thanks
Glad you like 💚
Amazing. I love this!
Glad you like it 💚
Nice job. Thanks.
I like your content a lot.... most of these are not present in normal power bi trainings
Glad you like the content 💚
Helpful video, thank for sharing. And I want to know what your screen record app? thank you!
You saved me!. Subscription.)
Superb.... 👍
Thank you!
Awesome ❤
It is awesome content. 👌 Sir if you can explain DAX bit advance level it will be good. I have raise one query from many power bi experts and Dax champ no one come back with appropriate solution.
In future video could you pls explain running total by category and by month both together.
Means in each month like Jan ,feb ....etc i can calculate running total of all orders of all products.
A bit not exactly my topic, but as usually interesting, so thanks! :)
Glad you enjoyed it!
@@GoodlyChandeep your videos are always enjoy. :)
wow, that's very good, thanks ❤
Glad you like it Bruna!
I still use Excel 2016 ... maybe is this the reason why gives me sintax error?
How i should do this for entire table instead of only one column?
Mine acts weird. When I use try I only get FALSE with a error in the window saying "DataFormat.Error Invalid Cell value "#N/A". I am seriously struggling to find this error, I have a table with a million rows and it stops the whole query. I cant even use a blanket remove error it still says dataformat.
You always crack me up…”what the HELL is a try and a catch???”
Haha..thanks! 💚
@@GoodlyChandeep Of course! It’s nice to see someone else making excel puns and asking the *real* questions. Haha
Any chance there’s a way to do find and replace in the advanced editor? Right now I’m copying / pasting the code into MSFT Word to edit, then pasting it back. Maybe it’s something that won’t be as much of an issue as my M Code improves.
How to catch "DB connection Time out" error in Power Query?
first like.. first comment...
👑
Because message error is unique you can use text.contains
I am trying to use try otherwise and if then with two arguments, but it doesn't work (with two merges), any idea how to do two merges in the same step ? the argument =try Table.ExpandTableColumn(#"Merged Queries1", "Table1", {"A", "B"})otherwise Table.ExpandTableColumn(#"Merged Queries1", "Table3", {"A", "B"})
Hopefully youtube doesn't break the formatting. here's what you want
= try Table.ExpandTableColumn(#"Merged Queries1", "Table1", {"A", "B"})
catch (e) => Table.ExpandTableColumn(#"Merged Queries1", "Table3", {"A", "B"})
try `otherwise` is the old format, you lose any potential error information, or that there even was an error.