-
1. Re: Creating a dynamic Top N pie chart with "Other" using # of Records [10.2]
Patrick Van Der Hyde Jul 6, 2017 11:43 AM (in response to Arthur Howland)Arthur,
Did you review this post - Top N and Others Pie Chart - the key is for those filters to be added to the context to get them to apply per that post.
Patrick
-
2. Re: Creating a dynamic Top N pie chart with "Other" using # of Records [10.2]
Arthur Howland Aug 17, 2017 10:50 AM (in response to Patrick Van Der Hyde)Patrick,
Your link was very helpful and think I've got it figured out. I'm going to format the answer I'm looking for so I can search for it later - I do top N's a lot.
Goal: Tableau top 10 -- Dimension = [Error Message], Measure = [Number of Records] + 'Others' catch-all result
Procedure:
1) Create Parameter: [Top N] = integer, current: 10, range: 1-10.
2) Create Set by: right-click Dimension "Error Message" > Create Set > "Top N Error Messages Set" > Top > By Field, Top: [Top N] by Number of Records, Sum.
3) Create Dimension: [Chart DIM] = IF [Top N Error Messages Set] THEN [Error Message] ELSE 'Others' END.
4) Create Measure: [Chart DIM Measure] = IF [Top N Error Messages Set] THEN [Number of Records] ELSE 0 END.
5) Setup
a) [Chart DIM] goes into ROWS.
b) [Chart DIM Measure] goes into ROWS.
c) Any filters > right-click > "Add to context"
Optional:
6) Pie Chart
a) [Chart DIM] goes into colors
b) [Sum(Number of Records)] goes into size
c) [Sum(Number of Records)] goes into angle
What I learned: The new dimension "[Chart DIM]" and measure "[Chart DIM Measure]" are sensitive to the "add to context" filters.