question

FaatinAqeelaGhazali-8849 avatar image
0 Votes"
FaatinAqeelaGhazali-8849 asked FaatinAqeelaGhazali-8849 commented

Order By In SSAS

99304-image1.png



As you can see the image above, how to make the order like
'<10days'
'10-20 days',
'21-30 days',
'31-50 days'
'>50 days'

is it possible?

sql-server-analysis-services
image1.png (5.5 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

NandanHegde-7720 avatar image
1 Vote"
NandanHegde-7720 answered FaatinAqeelaGhazali-8849 commented

Hey,
There is a sort by property at column level in ssas.
So you would need to have a mapping table :

<10. 1
10-20days. 2
Etc.

Then create a relationship between the fact table and this mapping table and use the sort property and sort it by the numerical column.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Yeah I did this way. This is the reference step by step to do it. Totally helps me. Hope it help others too. <3

sql-server-analysis-services-how-to-set-the-order-by-attribute-sort-key



0 Votes 0 ·
LukasYu-msft avatar image
0 Votes"
LukasYu-msft answered FaatinAqeelaGhazali-8849 commented

The easiest way I can see is to change "<10 Days" to "0-10 days" also change ">50 days" to "50 and more days". Something like this should work automatically.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Great idea Lucas, but I need to follow exact format as given by my superior. Thank for answer btw :)

0 Votes 0 ·