Forum Discussion
hkusulja
4 years agoFrequent Visitor
How to calculate new column, filter table, sort and select first
Hello, I am using Power Query and got the response. I need to create additional columns, so I can later create hierarchy. My current table looks like this: No Name 10000 Assets 1...
hkusulja
4 years agoFrequent Visitor
Hello,
my table is much bigger, with lot of rows, i do not need to set static value like "assets" or "liabilites", instead it needs to be calculated, based on required formula that i provided. So it is not simple IF statement in M..
Anonymous
4 years agoNot applicable
Good morning hkusulja!
I think it is not so much a problem of M language, but of specifying in an auxiliary table a mapping of your accounts.
For example for this example table that you put would be the following:
| 100 | Assets |
| 110 | Bank Accounts |
| 120 | Equipment |
| 200 | Liabilities |
| 210 | Accounts |
So if you extract the first digit on the left you could do an IF condition that tells you if it is Assets or Liabilities and if you extract the first 3 digits you could get your L2.
I hope this help you.