Most of the current week amount and current month amount are coming for Null value of the Parent Id. So if I don't remove the Null value from the Parent Id everything goes on fine.
When I remove the Null value from the Parent Id then it shows me 50-1 = 49 marks, 75-1 = 74 rows and so on. I guess everything is working fine.
Top N Parent.twbx 1.3 MB
I explicitly removed null from the view because i don't need the child ids which don't have any parent.
For the same reason I also added it as context filter to get the count right, i.e. 50 not 49 or 75 not 74.
Also none of the values for the parent ids are null when you select top=75.
You can create a simple table and check.
The set which you have created is based on a field which you are going to change with the help of the parameter. Now let us take an example:
I have created a set based on Top 75 values of Current Week Amount. Now this set will show me all the values of parent ID which comes in the criteria of TOP 75.
Similarly if I create another set which based on Top 75 values of Current Month Amount it might show me Parent ID's which would not be in the Top 75 values set based on Current Week Amount and that is why the Null Values.
I hope this makes sense to you.
I understand your point that Top 75 Parent Ids would change dynamically according to the value selected in the Sort By parameter, but the values should not be greater than 75 in any case.
With the combination Top = 75 and Sort By = Current Week Amount, the number of Parent Ids is coming as 78(with 3 null values), instead of 75.Now change the value to Top = 100 and you will see the data for those Parent Ids appears.
When you change the combination to Top = 75 and Sort By = Current Month Amount, the number of Parent Ids is 75 with absolutely correct data.
Just go to the bottom of the the chart and you will see the extra blank accounts.
You can also take a crosstab and check the no. of distinct parent ids.It will come out to be 78 instead of 75.
I have gone to the bottom and checked. That is the reason why I said 'It is working now'.
I guess there is a problem with your data or maybe I don't know. Earlier in the screenshot it was working fine. But now it is again showing 78 rows.
1 of 1 people found this helpful
I think it's a bug in Tableau that still exists in a form in Tableau v10.1 (I get 77 rows instead of 78). I've got two solutions:
1) remove the sort on the Parent ID dimension.
2) change Parent Name from a discrete dimension to a discrete aggregate measure, for example with MIN():
According to everything I know about Tableau just using an aggregation here shouldn't change anything because there are many Parent IDs to one Parent Name, so changing the aggregation of Parent Name shouldn't have any effect on the view.
Also the results for the extra 3 Parent IDs in the 78 rows view are just plain wrong, the left-hand axis that has an LOD of Parent ID & Parent Name for should be returning a value for the SUM(Current Week Amount Measure) but it's not, only the right-hand axis that has an LOD of Parent ID, Parent Name & Child ID is returning a value.
I'll be submitting this to tech support.
FYI the case id for tech support is 02563097, I'll update when I get a response.
Thanks Jonathan Drummey for helping out.
Regarding the solutions you proposed, I cannot remove the sorting because it a business requirement to sort the parent ids according to the sort_by parameter.
And I tried aggregating the Parent Name field using min() in Tableau 9.2(we are still using tableau server 9.2.4 as of now), but it did not change the results. Might be it only works on Tableau 10.
Anyways, thanks for identifying it as an issue with tableau rather than a bug at the developer level.It's a sigh of relief for us.