The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I have a column of various values in the following format:
XX_123rgdt_XXXXX
XX_343dsbceurfvr_XXXX
XXXX_323d_XXXXX
and would like to extract into separate column values between _ and _ from above. I thought of using MID() formula but these values have different length in the middle so it would not work for all cases. does anyone know how to do this?
Solved! Go to Solution.
HI @Anonymous,
If the fact table records are similar to the sample data that you shared, you can use the following formula(path function) to create a new calculated colunmn to extract the specific part of strings:
New Column= PATHITEM ( SUBSTITUTE ( [Column], "_", "|" ), 2 )
Regards,
Xiaoxin Sheng
HI @Anonymous,
If the fact table records are similar to the sample data that you shared, you can use the following formula(path function) to create a new calculated colunmn to extract the specific part of strings:
New Column= PATHITEM ( SUBSTITUTE ( [Column], "_", "|" ), 2 )
Regards,
Xiaoxin Sheng
@Anonymous split column by _ and then use the middle column
https://www.tutorialgateway.org/how-to-split-columns-in-power-bi/