Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
er_abhichandra
Contributor III
Contributor III

Sorting in a bar chart

Hi,

I have a bar chart with two dimensions, Year and ProductType. I am displaying the current YearQtr plus last 4 YearQtrs, based on selections.

I am trying to sort the Product types in a particular order through expression in Sort tab.


The problem I am facing is that the products are getting sorted only for the Year and quarter selected in the filters. for the last 4 YearQtr it is not sorting in the same order. If i select multiple Years or Qtrs, then for those YearQtrs, the ProductTypes are getting sorted. I haven't faced this kind of behaviour before. Usually it sorts for the entire chart irrespective of selections.

Your thoughts?

Thanks,

Abhinava

18 Replies
Not applicable

Hi,

try to sort the Table using Inline table. for example if you want to sort like Months in the order you want you create an inline table and give the table the format you want. you can choose which month to start with and which names to display. like this

LOAD * INLINE [

    Maand, MonthSort1

    1, okt

    2, nov

    3, dec

    4, jan

    5, feb

    6, mrt

    7, apr

    8, mei

    9, jun

    10, jul

    11, aug

    12, sep

   

];

er_abhichandra
Contributor III
Contributor III
Author

Hi Abdallah,

I have tried that. it doesn't work.

any other option?

Thanks,

Abhinava

saumyashah90
Specialist
Specialist

can you please attach the file or example??

ashishkalia
Partner - Creator
Partner - Creator

Abhinav

Can u please share some data or qvd relevant to that....???

er_abhichandra
Contributor III
Contributor III
Author

Hi Saumya... I am attaching a screenshot of the chart. The six producttypes have to be sorted from top to bottom of the chart. only the bar related to selected YearQtr is being sorted. Rest are in some random order. The chart that I am talking about is Mktg Source ones.

Capture.PNG
Thanks,

Abhinava

saumyashah90
Specialist
Specialist

Both Bar Chart and Stacked Chart seems have the same sorting order if i am not wrong.

er_abhichandra
Contributor III
Contributor III
Author

Thats correct Saumya. Both Mktg Source stacked bar chart have to have same sorting order.

Thanks

Abhinava

saumyashah90
Specialist
Specialist

So what is your question. Both seems to have the correct sorting order?

er_abhichandra
Contributor III
Contributor III
Author

No Saumya, Only the YearQtr pertaining to the selected Year & Qtr is being sorted, rest of the Year Qtrs are not being sorted in the order specified.

Thanks,

Abhinava