Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi community,
I have the following challenge, my Path_no_cycle column looks like this:
I need to keep only the first 3 digit before every ( - )
If we take one as example :
ORIGINAL data VALUE:
| CGNA-CGNH-CDGH-MRSA-MLAT7-MLAT8 |
DESIRE DATA VALUE data VALUE:
| CGN-CGN-CDG-MRS-MLA-MLA |
Thanks!
Solved! Go to Solution.
@Anonymous
In Power Query...
1st... Split Column by Delimiter ("-")
2nd... Select All Column and then Replace null => "del" value
3rd... Select All Column then in Transform => Extract => First Characters (3)
4th... Select All Coumn and then in Tranform => Merge Columns ("-")
5th... Replace "-del" => blank
Here you go.
@Anonymous
In Power Query...
1st... Split Column by Delimiter ("-")
2nd... Select All Column then in Transform => Extract => First Characters (3)
3rd... Select All Coumn and then in Tranform => Merge Columns ("-")
Thanks i think we are close!
Since not all the strings have the same leng i have some null and the result is: ( i see -----after the laste one)
@Anonymous
In Power Query...
1st... Split Column by Delimiter ("-")
2nd... Select All Column and then Replace null => "del" value
3rd... Select All Column then in Transform => Extract => First Characters (3)
4th... Select All Coumn and then in Tranform => Merge Columns ("-")
5th... Replace "-del" => blank
Great!!! thanks
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!