Forum Discussion
daouddajani
11 years agoNew Member
Reverse Text
is thier a way to flip (reverse) the contant of a field i.e volumn x has the value 12345 i need it to be displayed 321
- 11 years ago
Are you reversing and truncating or just reversing? You can reverse text in M by saying
Text.Combine(List.Reverse(Text.ToList("12345")))
Greg_Deckler
11 years agoCommunity Champion
Here's an Excel formula I found that you could probably adapt using equivalent DAX functions:
Type this formula:
=IF(LEN(A1)<1,"",MID(A1,LEN(A1),1))&IF(LEN(A1)<2,"",MID(A1,LEN(A1)-1,1))&IF(LEN(A1)<3,"",MID(A1,LEN(A1)-2,1))&IF(LEN(A1)<4,"",MID(A1,LEN(A1)-3,1))&IF(LEN(A1)<5,"",MID(A1,LEN(A1)-4,1))
DAX has LEN and MID formulas. Replace A1 with your column name.
Got the formula from here:
http://www.extendoffice.com/documents/excel/1146-excel-reverse-string-word-order.html#a1