Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
zagzebski
Creator
Creator

Advanced Sorting (by field not in dimension or epxression)

I have a field that I want to sort by but I don't want it in my chart.

My chart: Dimension is Month and expressions are previous 12 months, previous 13-24 months etc. So currently I have data through August so  each expression will just have the total of  September - August (the last 12 months and so on). I know I could us the match function in the expression area of sort but that would have to be changed every month then and need to be dynamic in case the selection was different. What I really want to do is sort by my MonthYear field 201309, 201310, etc. but not have it anywhere in the chart because it is doesn't allow for expressions to be on the same line since the year is included.

Any thoughts?

1 Solution

Accepted Solutions
adamdavi3s
Master
Master

This will not work if you have dates selected in the dashboard.


This is why you need the "only" formula as the {1} set analysis tells it to disregard any selections in the sort.

View solution in original post

18 Replies
marcus_sommer

You could convert your static match-expression into a dynamically expression with $-sign expansion:

match(Month, $(=Expression))

whereat expression returned your numeric/string-list of month/time-periods per loop/concat from min/max time-period or getfieldselections.

- Marcus

MarcoWedel

In the chart's sorting tab you can define a sorting expression, i.e. You could display your month dimension but sort by your MonthYear field.

regards

Marco

zagzebski
Creator
Creator
Author

So I am not sure what would go in your expression above.

My dimension is:

Month: Jan, Feb, March, etc.

I want to sort by but not have in my dimension:

MonthYear: 201308, 201309, 201310, etc.

This way Aug would be first, then Sept, then Oct and so on

Just not sure how that works into your example from above

zagzebski
Creator
Creator
Author

But how would I sort by MonthYear in my sorting expression? Not sure of the syntax.

Thanks.

ecolomer
Master II
Master II

Put in the expresion to order

p5.png

marcus_sommer

You aren't limited by fields in your chart - you could use all fields which are assigned together - for example if they are from the same table or connected by a key to a master-calendar or similar.

In your case will be properly an avg(MonthYear) in the sort-expression work.

- Marcus

adamdavi3s
Master
Master

I tend to use =only({1}MonthYear)

This means month selections don't cause things to re-order etc

zagzebski
Creator
Creator
Author


I put "MonthYear" in the sort expression but still not working. This is the data:

untitled.png

zagzebski
Creator
Creator
Author

I tried putting that in but still not working. I included what I want to get to work in a reply above.