Unfortunately, with the limitation of not having a sort button on the total, this is not as simple as one would like. However, there is a way to do this. What I did in the above example, was create a sorting column. I started out by trying to add a calculation to give myself a SUM of the metric/fact by the Dimension ('Utility'). However, if I do this, it shows up as a fact/metric, and it won't let me sort on it. So, I then tried to check the option 'Treat as an attribute column'. However, this caused performance issues that were unacceptable. So, I finally came to a solution where I created a Rank column, by ranking the sum of the metric by the 'Utility' field, and then converted it to an integer (if you convert to a character, it will sort a 10 before a 2). I set the option to treat the field as an attribute, and now it works. Below is the example of what I did.
This formula gives me the ability to have a Rank column that I can now put in my pivot and sort on it. If I want to, I can also hide this field, but the downfall of this is that once hidden, none of the other sorts will work, since the first sort is on a hidden field. Below is the formula and a picture of the final result:
CAST(RANK(SUM("Fact Table"."Field" BY "Dimension Table"."Utility")) AS INTEGER)
Very good information. Thanks for sharing
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteYes! Thank you! Now I need to read all your posts :)
ReplyDeleteNice! This works perfectly!! Thank you!!
ReplyDeleteYou made my day ! Thank you !
ReplyDeleteThanks for the information. I wanna ask you something a little different. What if my grand total column is a percentage area? Will it work that case??
ReplyDeleteWorks great! Thank you!
ReplyDelete