3 Replies Latest reply on Jul 2, 2013 7:28 AM by Jonathan Drummey

# Sort with measure from secondary data

Hi everyone !

I would like to sort my data with a measure coming from my secondary data source.

Is there a way to do it or a work around possibility?

As well, I have created a rank with the INDEX() function, I also would like this rank to adapt on this measure form the secondary data source.

I have attached an example of a workbook like mine.I cannot blend the data with Excel... Do you have a way to sort the client by their average money spent? If not possible, we swap primary and secondary data source but I would like to be able to do the "only relevant values" for the filters.

Thank you very much for any help! This is pretty urgent actually...

Best regards,

Thibault

• ###### 1. Re: Sort with measure from secondary data

If these two sets of data are coming from the same data source, then the easiest is to use a multiple tables connection so that way you have one data source with all the info, I set that up in the attached. Even if they aren't from the same data source, there are a variety of techniques you can use via linked worksheets, tables, etc. to create a federated data source. I set an example up in the "multiple tables" in the attached.

Alternatively, you can add a sort by using Tableau's alphanumeric sort. I created a calculated field that returns the -SUM(Average Money spent), set it to Discrete, and put it on Columns to the left of Client. Then I made sure that the Ranking calc uses a Compute Using of Table (Across). I'm almost certain this kind of arrangement (sorting by the field from the secondary) will only work because the we're using relative addressing, i.e. Table/Pane Across/Down, I haven't been able to find any way to get it to work using fixed addressing (i.e. an Advanced Compute Using or specifying a particular dimension for the compute using).

Jonathan

• ###### 2. Re: Sort with measure from secondary data

Thank you very much Jonathan !

The best way is the multiple table, thank you !!

• ###### 3. Re: Sort with measure from secondary data

You're welcome!