So I am using PowerPivot and have grouped a number column by buckets of 30. My only problem is that the end result doesn't sort correctly because it thinks '30' is greater than '130' based off the first character. I am trying to figure out how to format so this sorts correctly. My thought is to add a '0' in front of the 2 digit numbers since the data will max out at 3 digits. If I add a zero to the formula below it still doesn't not display the '0'. I have googled this for about an hour and no luck. Does anyone know the =format for DAX to get my buckets to sort?
=IF([Days in Q]<30,"<"&30,FLOOR([Days in Q],30)&" - "&CEILING([Days in Q],30)+IF(MOD([Days in Q],30)>0,-1,30-1))
the output looks like this:
Row Labels
<30
120 - 149
150 - 179
30 - 59
60 - 89
90 - 119
but needs to look like this:
Row Labels
<30
30 - 59
60 - 89
90 - 119
120 - 149
150 - 179
thanks in advance as this site has saved me more than one occasion. I think an excel format would be close even since this is PowerPivot / DAX. I have also tried to sort this in excel and no joy.