Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
I have a column that has mixed hexadecimal MEIDs (mobile equipment identifier - 14 characters) and decimal MEIDs (18 characters). I'd like to convert the hexadecimal MEIDs in the column to decimal and leave the decimal ones alone.
I used this formula in Excel to accomplish the task, but I can't get my DAX or Power Query attempts to work. Any help would be appreciated.
=IF(LEN(A2)=14,CONCATENATE(TEXT(HEX2DEC(LEFT(A2,8)),"0000000000"),TEXT(HEX2DEC(RIGHT(A2,6)),"00000000")),(A2))
*Red text denotes the Excel cells.
Solved! Go to Solution.
You may add a custom column as follows.
if Text.Length([Column1]) = 14 then Text.PadStart(Text.From(Expression.Evaluate("0x" & Text.Start([Column1], 8))), 10, "0") & Text.PadStart(Text.From(Expression.Evaluate("0x" & Text.End([Column1], 6))), 8, "0") else [Column1]
You may add a custom column as follows.
if Text.Length([Column1]) = 14 then Text.PadStart(Text.From(Expression.Evaluate("0x" & Text.Start([Column1], 8))), 10, "0") & Text.PadStart(Text.From(Expression.Evaluate("0x" & Text.End([Column1], 6))), 8, "0") else [Column1]
Thank you! Worked perfectly!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.