I am new to adding formulas to Power Query. I am adding a new column that I want to have a formula in that uses the last 4 characters of whats in another column [Commodity]
unless the value in that column ends with the letter C. If it ends with the letter C then I was taking the last 5 characters (Left([Commodity],5) and then the first 4 of that formula
10010030 would be 0030 in the new column
101160C would be 1160 in the new column
In Excel this formula would have been:
=IF(RIGHT([@Commodity],1)<>"C",RIGHT([@Commodity],4),LEFT(RIGHT([@Commodity],5),4))
I am trying to figure out the equivalent to this formula to use in Power Query.
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.