6 Replies Latest reply: Apr 6, 2015 3:52 PM by Amar Bogam RSS

    Data Island sorting

    Sushma RM



      I have two tables Table 1 and Table 2 which are not linked to each other(basically  two data islands).

      Both tables have same list of countries say 50 countries


      Nothing is similar between Table 1 and Table 2 except the Countries (50 countries)

      My Table 1 Country column is  sorted on revenue metric column in descending order .

      can I get same sorting order in Table 2 (i.e.: Country sorting on revenue column of first table)?


      Without linking the two tables can we sort? Is there any way we can do in frontend design by using concat() function or any other..?


      Really appreciate your thoughts on this..

        • Re: Data Island sorting
          Brian Garside

          Sort each table at the Script level then in your Chart go to Sort > Load Order > Original.

          Or you can try an Expression in the Sort tab based on your Revenue Metric.

          • Re: Data Island sorting
            Massimo Grossi

            maybe with sort by expression

            sum(if(country2=country, revenue))

              • Re: Data Island sorting
                Sushma RM

                Thanks a lot this works.. if I give a calculated dimension in both the tables and then the condition in sort expression of Table2 .

                But is there a way to control just the sort order in the Table 2 but not the filter selections of Table 1 affecting Table 2 .


                I am trying to create a variable  using  Concat function  (=concat(distinct country, ',')in a text box and using that variable in Table 2

                on click of the text box the sort on Table 2 changes .


                when I try to use the revenue metric in concat function its showing an error nested aggregation not allowed


                as per the business requirement the only sort should be in same in two tables and nothing should change on any filter selections


                Thanks for the reply..

              • Re: Data Island sorting
                Amar Bogam

                If you do it in the script it is better (passing the sort order from one table to the other)

                1. create a field in table 1 for sorting coutries based on revenue,i.e. Flag_Cntry_Sort

                2. then create a applymap table with this , fld1 = country, fld2 =Flag_Cntry_Sort

                3. create a new field in table 2 using this applymap on country field. i.e Flag_Cntry_Sort2

                4. use these fields for the sorting (i.e. sort by expression)