Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Data Island sorting

HI

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..

6 Replies
b_garside
Partner - Specialist
Partner - Specialist

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.

Anonymous
Not applicable
Author

Thanks for the reply.

My Table 1 Sort order should change dynamically on filter selections and same sort should reflect Table 2

I cannot use Revenue Metric Expression in the Sort tab in Table 2 as these are data islands and will break my application


maxgro
MVP
MVP

maybe with sort by expression

sum(if(country2=country, revenue))

b_garside
Partner - Specialist
Partner - Specialist

You may need a $(variable) in your expression to handle the dynamic nature of the selections.

or use [$Field] to match user selected fields?

Anonymous
Not applicable
Author

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)

Anonymous
Not applicable
Author

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..