# How to find out the company/brand name that have max %

il y a 1 mois 2 semaines #188530 par Ni3
Hi team,

I have a question asking for purchase volume (in %) in company

Q1 (Array - number)

Company Share in %
Company A 20%
Company B 50%
Company C 30%

I want to find out which Company have highest percentages. I need the Company name so that I can pipe it into next question

Next question is
Q2.Please rate the following statements for the company you named [Company Name] where you buy the most ….

I tried using max function in the equation type question but I am only getting the percentage value, how I will gate the name of the company?

Q1a – equation type.

{max(Q1_1_ SQ001.NAOK, Q1_2_ SQ001.NAOK, Q1_3_ SQ001.NAOK)}

Connexion ou Créer un compte pour participer à la conversation.

LimeSurvey Partners
il y a 1 mois 2 semaines #188532 par Joffm
Hi,

you have your equation to calculate the maximum (Q1a).
Just compare the values of the companies with this maximum in an if-statement.

{if(Q1_1_ SQ001==Q1a,"Company 1",if(Q1_2_ SQ001==Q1a,"Company 2",if(Q1_3_ SQ001==Q1a,"Company 3","Company4")))}

Furthermore you have to decide what to do if two companies have the same value.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Connexion ou Créer un compte pour participer à la conversation.