jason
jason

Reputation: 64

tableau -using filtered data in calculation and further filter

I'm awkward as I only have Tableau public on my own computer. I'm using proper tableau on a remote desktop and can't upload data/files.

I'm wondering if anyone can give me the general route as to what I'm trying to do. I'm not sure if this is really easy and I'm just missing a critical feature of tableau. I've used parameters, filters and calculated fields and I think what I want to do is a combination of these and possibly passing variables (parameters) to different sheets (if that's possible?)

Here goes...

I have one set of data. A list of universities and their "score" (uni ranking). I want to pick one university and compare (subtract) their score from the other universities to find the nearest university by 'score'.

  1. I want to select a university from a list based on a parameter. (I can do this!)
  2. Create a filter based on the list
    In my example 1 and 2 return a single record but I don't think that's a worry as I can sum/average
  3. Based on 1 and 2 I think I want to define a parameter which holds the value of score for the one university selected.
  4. I then want to use the parameter (score) from (3)in a calculated field to perform a calculation on other records (subtract the filtered value from other values)
  5. I'll use the result of the calculation to filter out some data i.e. using "top"

I don't think it can all be done on one sheet? Is that correct? Do I need to create a sheet to allow for 1,2 and 3 and then pass the parameter to a new sheet for 4 ad 5?

I'm not sure if this is the right way to do things so any clues/tips/examples are really helpful. I'm not sure I'm googling the right thing either.

Thanks
Jason

Upvotes: 1

Views: 933

Answers (1)

Alex Blakemore
Alex Blakemore

Reputation: 11921

Create two calculated fields:

  1. Score-of-selected-university = { fixed : min(if [university] = [selected-university] then [score]) }
  2. score-difference = `[score] - [score-of-selected-university]

Where [selected-university] is your parameter.

To go further, learn about LOD calcs.`

Upvotes: 2

Related Questions