4 Replies Latest reply on Jun 29, 2017 8:54 AM by juan perez

Mode Calculation; Need to compute modal price for a series of products.

Hi,

I've look at the Mode Calculation posts of K. Chandler, Ben Cho and Alan Smithee.  I can't seem to get their suggestions to work in my master table.

As you can see in the Price Data tab, I have a list of brands by market.  I want to show the average, MAX (High), MIN (Low) and MODE price for each brand.  Tableau does a nice job with the MIN and MAX functions, but I can't get the Mode calculation to work in the Price Data table.

I followed the suggestions of the earlier posts on the subject and was able to produce a single modal price using: WINDOW_MAX(SUM([Number of Records]))=SUM([Number of Records]) in the Mode Price tab.   However, it will only allow me to create it for one market and just one brand.

Attached is the .twbx.

I would appreciate help getting a modal price in the Price Data tab for each Market and Brand.  Your help would be appreciated!  Thank you,

Andrew

• 1. Re: Mode Calculation; Need to compute modal price for a series of products.

Hi Andrew,

Please check the attached solution and let me know if that's what you were looking for.

Best,

-V

1 of 1 people found this helpful
• 2. Re: Mode Calculation; Need to compute modal price for a series of products.

Vasil,

This is genius!  Thank you very much.  Problem solved!

Andrew

• 3. Re: Mode Calculation; Need to compute modal price for a series of products.

Hi Vasil,

I am doing the same thing, I just have one problem, when there are 2 modes it only returns the bigger value. Is there a way around this where it returns both? I created another field where its a true if it is the mode and would like both modes to show up

Best,

Lin

• 4. Re: Mode Calculation; Need to compute modal price for a series of products.

Hello

I am trying to open the workbook added by Vasil Petkov and it does not show the viz. I am opening it with 10.2 version, by the way.

What should I do in order to see the solution? Thanks