5 Replies Latest reply on Mar 12, 2019 12:43 PM by sindhu gullapalli

# Count of values table acorss and table down

Hi Team,

I have a requirement, where i want to show the count for complant reason cateogry and product category.

so i need to calculate to show the top 5 from both and rest in "All other" Category, i have calculated with parameter and calculated fields help.

as a separate if i am showing product count and reason count its showing perfect.

but when i am trying to count both at the same time, for All others its not giving the right values either its hiding row wise or column wise.

i cant attach the workbook, hence attaching the screen shots.

Table across

Table down

calculated filed i am using

IF ([(Calc) In top n]) THEN

(COUNTD([Case Id]))

(COUNTD([Case Id]))

ELSEIF ([(Calc) Others]) THEN

WINDOW_SUM((COUNTD([Case Id])), 0, last())

ELSE

NULL

END

Actual count

• ###### 1. Re: Count of values table acorss and table down

Definitely a workbook is needed to help you here.

• ###### 2. Re: Count of values table acorss and table down

sad thing , i cant shar it

• ###### 3. Re: Count of values table acorss and table down

Hi Sindhu!

Don't worry it can be done on Tableau and is more simple that you can imagine, you will need something that well, not much people use, and that is the use of 'Sets' so what we will do is to create a dynamic set that contains the top 5 complains or prod cat by countd(case id). So, let's start!

.

1. First create the set (I'll use super store)

2. Create the condition

3. Create the Calculated field (the set is a boolean)

4. Drag the new calculated field into the column/row shelf

5. Repeat for the other dimension and that's it

Please, tell me if it worked for you!

• ###### 4. Re: Count of values table acorss and table down

Hi Andres,

your reply is really helpful, i am struggling with this for few days.

you just simplified my work .

thanks a lot!!

• ###### 5. Re: Count of values table acorss and table down

Hi Andres,

I am having one more issue with this top 5 and all others..

current month volume its giving perfect, but when i am trying show the details in a year, each individual month is not displaying what expected ,

unfortunately i will not be able to share the workbook, attaching the screen shots.

if you observe the below screen in feb i dont have all other group , but in total percentage it has an entry and reason category is limitng to first month values and then giving values for other months ...hope you can help me out here.

Jan month count

feb count