It's possible you could use the same technique I used here in the tool tips for overlapping marks:
This method used a lookup of the next rows - you could probably use previous_value() as well to append new names.
Alex, thanks for the reply.
I am running into some trouble though. What happens is that it repeats the same name many times. In my example it would do:
Toronto Jeff, Jeff, Jeff
I suspect is this due to the fact that in the data I have many rows for each of the names that I do not show on my viz. Or maybe I am missing something here. I do not use table calculations very often. Any suggestions?
Yep, that's exactly the problem. Need to think more about this.
If you use the previous_value method, you could do something like
if lookup([Name],-1)=attr([Name]) then previous_value else previous_value(Null)+", "+[Name] end
That's a rough idea - would need to work it out properly
Alex - the sample workbook that you have posted above seems to have errors - or is it just me seeing them?
Excellent solution, Alex! I'm still getting my head wrapped around what PREVIOUS_VALUE can do, this is a great example.
Siraj - I had no problem opening the workbook. Are you on 7.0.4? I don't have any hard evidence, but I do suspect that the table calculation changes made for 7.0.2 and 7.0.4 aren't totally backwards-compatible when the workbooks are opened with 7.0 or 7.0.1.
Thanks Alex! That worked perfectly. Very creative solution.
Siraj, I was getting an error too but then I upgraded to 7.04 like Jonathan was sugesting and now it works.
btw I think this solution will only work with 7.04 because for table calculations in Filters you cannot set "Compute Using" to fields in Level of Detail. In this solution you cannot set "Last Person" to Compute Using "Person" if it's in filters.
Compute using with detail shelf was there before. The biggest change was being able to use sort automatically. However, I have that set explicitly anyway so I'm surprised it breaks in versions before 7.02. Kind of concerning actually. I thought you were only supposed to lose compatibility between major version changes (6.0 to 7.0)
Let's make it more complex:
City Name Special? Toronto Jeff 1 Toronto Jack 1 Toronto Jill 0 Montreal Adam 1 Montreal Adam 1 Montreal Adrian 1 Montreal Allan 1
Would it be possible to show:
1. How many times a person was in the city.Is it possible to add to this excellent work the following:
City Names List Toronto Jeff(1),Jack(1),Jill(1) Montreal Adam(2),Adrian(1),Allan(1)
2. Show the output in real order as appears in the file (or sorted by an increasing counter or something that shows order)
I would actually have Jeff,Jack,Jill and not Jack, Jeff, Jill
Or in your working example for Torono
Person Place List of People (current) List of People (desired) John Toronto Amy, Frank, Jeff, John Jeff, John, Amy, Frank
3. Include only those that have mark Special?==1, resulting in:
City Names List Toronto Jeff(1),Jack(1) Montreal Adam(2),Adrian(1),Allan(1)
From my tests it seems that just setting a filter works.
Would be great to see how to do it.
I've been able to answer question 2.
I added the row number to the Rows field (and hid it afterwards).
It was a matter of applying advanced table calculation (partitioning) and sorting over the row.
It was done for both the filter and the table calculation (List of people)
You can find it in the Results2 tab.
Can someone help me with question 1?
Names2.twbx 42.5 KB