Forum Discussion
Matrix doesn't sort column alphabetically correct
- 2 years ago
If anyone else encounters the same or similar problem as me, creating a sorting table helped resolve my problem, since everything else I tried failed.
I made a table containing the first three letters of the alphabet in all variations in the first column and then inserted the row numbers in the second column.
ABC_column ABC_sort AAA 1 AAB
2 AAC 3 AAČ
4 AAD
5 ...
... After that I made a custom column in my surname table with the DAX function LEFT (Column = LEFT(Table[surname],3) and made a one-to-many relationship between these two tables. Then I added a related/lookupvalue column so I could sort the surname column based on the sorting column. When I got a circulated dependency warning I just duplicated the surname column and made a work around. Now it seems to work.
After I did this, I saw that my table wasn’t updating correctly. The database was fine, the data import was fine, the data looked fine in the query editor and was refreshed, but when I clicked “close & apply” it said that the data was loaded correctly, but it wasn’t. I don’t know what caused this and I’m looking into it.
If anyone else encounters the same or similar problem as me, creating a sorting table helped resolve my problem, since everything else I tried failed.
I made a table containing the first three letters of the alphabet in all variations in the first column and then inserted the row numbers in the second column.
| ABC_column | ABC_sort |
| AAA | 1 |
AAB | 2 |
| AAC | 3 |
AAČ | 4 |
AAD | 5 |
... | ... |
After that I made a custom column in my surname table with the DAX function LEFT (Column = LEFT(Table[surname],3) and made a one-to-many relationship between these two tables. Then I added a related/lookupvalue column so I could sort the surname column based on the sorting column. When I got a circulated dependency warning I just duplicated the surname column and made a work around. Now it seems to work.
After I did this, I saw that my table wasn’t updating correctly. The database was fine, the data import was fine, the data looked fine in the query editor and was refreshed, but when I clicked “close & apply” it said that the data was loaded correctly, but it wasn’t. I don’t know what caused this and I’m looking into it.