10 Replies Latest reply on Feb 10, 2019 11:45 PM by Deepak Rai

# Show only maximum in each group

I have data set

Sales Person, Product and Sales

1.   I what to show chart only max sales for each product

2.  in below chart if i do sort it sorting based on salesperson not by sum (totalsales)

• ###### 1. Re: Show only maximum in each group

if I understand what you want it is the maximum sales for each product for each sales person - is that correct?

this will do it

{ FIXED [Customer Name],[Product Name]:max([Sales])}

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

• ###### 2. Re: Show only maximum in each group

Yes your understandings are right.. Im very new to Tableau, where do i put this ?

{ FIXED [Customer Name],[Product Name]:max([Sales])}

May I have the tableau file ?

• ###### 3. Re: Show only maximum in each group

you right click the measure (sales)

and create a calculation

then you can place it on the marks card

Tableau has excellent on-line video training at Tableau Training: View Training Courses

Organized by subject form getting started to advanced calculations - 3-5 min videos on topics within each caegory

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

• ###### 4. Re: Show only maximum in each group

Sorry a little correction in logic

who sold maximum in each product

Expected result would be

Product a - Heaven - 12

Product b - jack- 27

product c - sparrow - 16

also consider if more than one person has same max sales, i want him to be showed as well.

• ###### 5. Re: Show only maximum in each group

did you try the formula I gave you

If you want that then wrap the formula I gave you in

{fixed product:max(sum( { FIXED [Customer Name],[Product Name]:max([Sales])})}

try it and experiment with what happens when you make changes in the formula and the viz

You will learn faster that way

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

• ###### 6. Re: Show only maximum in each group

Hi Vignesh,

Please see the below approach, I have used the rank function to filter the salesman with max sales

if RANK_DENSE(SUM([Sales])) =1 then 'SHOW' else 'HIDE' end    //[Edit the calculation to compute using Pane Across]

you can use RANK,DENSE_RANK modify according to your requirement.

1 of 1 people found this helpful
• ###### 7. Re: Show only maximum in each group

hi keerthana kumar, your screen shot shows absolutely what i need.

one doubt : where to set pane across ?

I done like below. Is there any way dynamically achieve the same with the column we select ?

• ###### 8. Re: Show only maximum in each group

I got following error with your formula,

Previous formula giving no error but not given expected result

• ###### 9. Re: Show only maximum in each group

Please check the below.  When you are changing the dimensions ,the calculations will become invalid --edit the calculation to change the Dimension selected.

• ###### 10. Re: Show only maximum in each group

Here is The Calculation:

Use the Calc above and filter out Null.

Thanks

Deepak

If it Helps, Pl Mark it Helpful and CORRECT to Close Thread