Forum Discussion

lgs1983's avatar
lgs1983
Helper I
6 years ago
Solved

Tidying Up Code / Simplifying Code

Hi All,   As you'll see from the below M code I'm very new to the language. What I was wondering is if there is a way to tidy up the below code as it's pretty much doing the same thing in places e....
  • Nathaniel_C's avatar
    Nathaniel_C
    6 years ago

    Hi lgs1983 ,

     

    It is the order in which you perform the steps. I would say create a bogus table and work on it by trial basis. Change a column name, then change a type or add a column, then look at doing two column name changes in a row or two type changes, and see how it combines them.  A lot of times I will use a form, like add a conditional column to see the syntax, and then change it to my requirement.  If you come from a programming background, this is different.  Most people just follow the steps. BTW if you used a form to enter something there will be a gear on that step. 

     

    That being said, if you are interested in learning M, there are websites and blogs out there. Once you get a handle on the form, it won't be long before you will be modifing your steps. This code doesn't usually go too long, as you just transforming the data.

     

    If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
    Nathaniel