Forum Discussion
4 Replies
- WILLIHHelper I
Hi MFelix,
I did try changing the format of the data to a number but it still does not let me sort it. You can't see it from the pictures but some of the id's also have alpha in them like "D0017" or "EB255". Would that make a difference because the data is still being recognized as text?
Thanks,
WILLIH
- MFelixSuper User
Hi WILLIH ,
Try the following code to add a custom column that you can then sort the other column by this one:
Power Query
try if Value.Is (Number.From([ID]), type number) then Text.PadStart([ID], 10 , "0" ) else [ID] otherwise [ID]Dax
Column = IF(IFERROR(VALUE('Table'[ID]);BLANK()) = BLANK();'Table'[ID];REPT("0";10 - LEN('Table'[ID])) & 'Table'[ID])