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

1 year 2 weeks ago #188530 by 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)}

Thanks for your help
The topic has been locked.
LimeSurvey Partners
1 year 2 weeks ago #188532 by Joffm

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.


Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.

Start now!

Just create your account and start using Limesurvey today.

Register now