
1. Re: How do you compare 2 things of the same measure/dimension?
Joe Oppelt Oct 12, 2018 3:12 PM (in response to Natalie Crow)1 of 1 people found this helpfulWill your actual application be using excel?
I can do this very nicely with LOD. But I get this error:
If you're not doing excel in your actual application, use that calc. Then filter for all places where that calc is greater than zero. (That calc will get a value at the level of [Place]. Each [Place] will have its own value.)

2. Re: How do you compare 2 things of the same measure/dimension?
Joe Oppelt Oct 12, 2018 3:35 PM (in response to Joe Oppelt)If you're using excel, I got this calc to work:
LOOKUP( WINDOW_SUM(SUM( IF [Person] = [Parameters].[Choose Person 1]
or [Person] = [Parameters].[Choose Person 2] then 1 else 0 END))>0 ,0)
Run it along [Person] like your other table calcs. You'll get True or False for whatever [Place] has either of the selected persons.
BTW, I do these strings lists a little differently. I grab a WINDOW_MAX of the growing string (which is usually the LAST() one anyway, which is what you were doing with your filter.) So there is a MINDOW_MAX on all rows, and then I filter for INDEX()=1.
So that's what you see in the attached example. Drag the [Get Persons] calc onto filters, and select for TRUE.
Names A.twbx 14.3 KB


3. Re: How do you compare 2 things of the same measure/dimension?
Natalie Crow Oct 15, 2018 10:24 AM (in response to Joe Oppelt)My actual application uses the Tableau Server not excel. However, I tried the calculation with this sample data and with my actual data and while the calculations were valid, they did not give the solution. Can you please paste your result when you have that calculation on?

4. Re: How do you compare 2 things of the same measure/dimension?
Joe Oppelt Oct 15, 2018 2:24 PM (in response to Natalie Crow)Natalie Crow wrote:
... Can you please paste your result when you have that calculation on?
What do you mean by the bolded part?
Given that I only have an excel file to work with, I can only get an error for the LOD calc.
Did you look at the sample workbook I uploaded? (Names A.twbx)
What happens when you use the table calc I did?

5. Re: How do you compare 2 things of the same measure/dimension?
Natalie Crow Oct 15, 2018 2:43 PM (in response to Joe Oppelt)Oh my bad  I didn't see the attached workbook. That helps a lot! Using that as a guide and the LOD calc with my real data I think I'm gonna be able to work through it from there. Thanks soooo mcuh for all the help!! I appreciate it.

6. Re: How do you compare 2 things of the same measure/dimension?
Natalie Crow Oct 30, 2018 8:43 AM (in response to Natalie Crow)I also used this formula. Just in case this will help anyone else who comes across this question:
IF [Choose Person 1] = "All" AND [Choose Person 2] = "All"
THEN "IN"
ELSEIF CONTAINS([List of People], [Choose Person 1]) and [Choose Person 2] = "All"
THEN "IN"
ELSEIF [Choose Person 1]<> "Null" and CONTAINS([List of People],[Choose Person 2])
THEN "IN"
ELSE "OUT"
END