Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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 on suffix values 1,25,12
Solved! Go to Solution.
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.
Hello there @Anonymous ! What is your criteria for splitting? Is there any kind of pattern?
Hi @goncalogeraldes , yes based on the key values which are added at last . In the above example for value 567891 , 1 is key similarly for value 7896525 , 25 is the key . As of now we can consider 1, 25 and 12 as key values for entire data set
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.
Thanks for you reposne , this works
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 5 | |
| 5 |
| User | Count |
|---|---|
| 24 | |
| 11 | |
| 9 | |
| 9 | |
| 8 |