Forum Discussion
Anonymous
5 years agoNot applicable
Number ordering issue (1,11,2,AB)
Hi all, I have issue with my number ordering. I have the following data (and the table will have more rows): Day Name Code 1 1-ABC 1 1 2-ABC 1 1 3-ABC 10 1 4-ABC 11 ...
- Anonymous5 years ago
Hi all,
I just found the solution in another post. I used the following dax formula and it worked:Sort_Order = IF ( NOT ( ISERROR ( 'Table'[Column] + 0 ) ) = TRUE (); CONCATENATE ( REPT ( 0; 4 - LEN ( 'Table'[Column] ) ); 'Table'[Column] ); 'Table'[Column] )You can refer to the following post: https://community.powerbi.com/t5/Desktop/Number-sorting-in-text-format/m-p/237256
Thank you for the help.
Pragati11
Super User
5 years agoHI Anonymous ,
Can you share a screenshot on what you see when you order the CODE column in ascending order? (just this column)
What does DAY column has in your data? Is it numeric? Can it be used to create a sort order for CODE column in someway?
Thanks,
Pragati
Anonymous
5 years agoNot applicable
Hi Pragati11,
This is a sample/example from my data:
| Code |
| 1 |
| 1 |
| 10 |
| 11 |
| 13 |
| 13 |
| 2 |
| AR |
| 15C |
| 20 |
| R |
| 3 |
The day field comes from another table. Also I have slicers for year,month.
10x.