Forum Discussion
Possible to sort cells?
- 6 years ago
Well, you could get there via DAX but it would be fairly nasty. You would need to create a column for each of your 10 things. You would use a formula like the following for each:
Column = VAR __find = "Colour: " VAR __pos = SEARCH(__find,[Column1]) VAR __semipos = SEARCH(";",[Column1],__pos) VAR __len = LEN(__find) RETURN MID([Column1],__pos + __len, __semipos - (__pos + __len))See attached.
Well, you could get there via DAX but it would be fairly nasty. You would need to create a column for each of your 10 things. You would use a formula like the following for each:
Column =
VAR __find = "Colour: "
VAR __pos = SEARCH(__find,[Column1])
VAR __semipos = SEARCH(";",[Column1],__pos)
VAR __len = LEN(__find)
RETURN
MID([Column1],__pos + __len, __semipos - (__pos + __len))
See attached.
- Greg_Deckler6 years ago
Community Champion
Are you getting that error in the PBIX I attached? Could be something wonky with the copy and paste of the double quotes if you are copying and pasting out of the forum.
- Anonymous6 years agoNot applicableAh it's not compatible with my version. I'm having the March version here and I can't install the November one on my laptop from work
- Greg_Deckler6 years ago
Community Champion
Hmm, you might try pasting it into notepad and then into the DAX formula bar. Or, simply try replacing the double quote characters in the DAX formula bar?
I will paste it here outside of a code block, perhaps that will work better if you cut and paste this instead
Column =VAR __find = "Colour: "VAR __pos = SEARCH(__find,[Column1])VAR __semipos = SEARCH(";",[Column1],__pos)VAR __len = LEN(__find)RETURNMID([Column1],__pos + __len, __semipos - (__pos + __len))