Forum Discussion
Anonymous
4 years agoNot applicable
Split columns based on multiple suffix values
I want to split column based on suffix values in Powery query and need to create 2 custom column For example, Column needs to be split and custom columns Main and Key needs to be created based o...
- 4 years ago
Hi, Anonymous
You can create two columns like this:
Key = SWITCH(true(),RIGHT([Column],1)="1",1,RIGHT([Column],2)="25",25,RIGHT([Column],2)="12",12)Main = SWITCH(true(),[Key]=1,([Column]-1)/10,[Key]=25,([Column]-25)/100,[Key]=12,([Column]-12)/100)Best Regards,
Community Support Team _Janey
If this post helps, then please consider Accept it as the solution to help the other members find it more.
v-janeyg-msft
Community Support
4 years agoHi, Anonymous
You can create two columns like this:
Key = SWITCH(true(),RIGHT([Column],1)="1",1,RIGHT([Column],2)="25",25,RIGHT([Column],2)="12",12)Main = SWITCH(true(),[Key]=1,([Column]-1)/10,[Key]=25,([Column]-25)/100,[Key]=12,([Column]-12)/100)
Best Regards,
Community Support Team _Janey
If this post helps, then please consider Accept it as the solution to help the other members find it more.
Anonymous
4 years agoNot applicable
Thanks for you reposne , this works