- Posts: 54
- Thank you received: 1

# exclude a variable by substitution

1 month 2 weeks ago #221120
by Fran1991

*exclude a variable by substitution*was created by

*Fran1991*

Hello dear forum, I hope you are all very well.

I tell you that I am in a dilemma with a question from the questionnaire that I am currently asking, it may be something simple but I have not been able to advance.

I have two questions, let's call them P1 and P2.

In P1 asks about the suppliers you have worked with on a list of 16 suppliers. (Multiple choice question)

P1. Select the providers you have worked with.

Provider 1

Provider 2

Provider 3

Provider 4

Provider 5

Provider 6

Provider 7

Provider 8

Provider 9

Provider 10

Provider 11

Provider 12

Provider 13

Provider 14

Provider 15

Provider 16

In P2. The providers that for the interviewee are the most important should be ranked, taking into account only the providers with whom they have worked. (Multiple entry question)

P2. What is the importance ranking of the suppliers you work with?Provider 1

Provider 2

Provider 3

Provider 4

Provider 5

Provider 6

Provider 7

Provider 8

Provider 9

Provider 10

Provider 11

Provider 12

Provider 13

Provider 14

Provider 15

Provider 16

So far everything is correct, however for the following questions I only have to take the first 3 providers according to the P2 ranking. but...

The provider that makes the evaluation is provider 4, so I am not interested in evaluating that provider if not its competition, so, if provider 4 is within the first three positions in the P2 ranking, I must take the supplier who is in position 4.

I hope my explanation has been clear.

How could I make this leap?

I thank everyone for any help or advice.

Greetings,

I tell you that I am in a dilemma with a question from the questionnaire that I am currently asking, it may be something simple but I have not been able to advance.

I have two questions, let's call them P1 and P2.

In P1 asks about the suppliers you have worked with on a list of 16 suppliers. (Multiple choice question)

P1. Select the providers you have worked with.

Provider 1

Provider 2

Provider 3

Provider 4

Provider 5

Provider 6

Provider 7

Provider 8

Provider 9

Provider 10

Provider 11

Provider 12

Provider 13

Provider 14

Provider 15

Provider 16

In P2. The providers that for the interviewee are the most important should be ranked, taking into account only the providers with whom they have worked. (Multiple entry question)

P2. What is the importance ranking of the suppliers you work with?Provider 1

Provider 2

Provider 3

Provider 4

Provider 5

Provider 6

Provider 7

Provider 8

Provider 9

Provider 10

Provider 11

Provider 12

Provider 13

Provider 14

Provider 15

Provider 16

So far everything is correct, however for the following questions I only have to take the first 3 providers according to the P2 ranking. but...

The provider that makes the evaluation is provider 4, so I am not interested in evaluating that provider if not its competition, so, if provider 4 is within the first three positions in the P2 ranking, I must take the supplier who is in position 4.

I hope my explanation has been clear.

How could I make this leap?

I thank everyone for any help or advice.

Greetings,

Please Log in to join the conversation.

1 month 2 weeks ago - 1 month 2 weeks ago #221122
by Joffm

Replied by

*Joffm*on topic*exclude a variable by substitution*
Hi,

you do it exactly as you explained it.

To store the result, you may create a hidden question of type "multiple short text" with three subquestions (QHidden).

Now ise an equation to fill these three places.

The first.

You know:

If "provider 2" is ranked first you have to take the second ranked.

{QHidden_1=if(P2_1==2,P2_2.shown,P2_1.shown)]

The second:

If "provider 2" is ranked first or second you have to take the third ranked else the second.

{QHidden_2=if(P2_1==2 or P2_2==2,P2_3.shown,P2_2.shown)}

And at last the third place

{QHidden_3=if(P2_1==2 or P2_2==2 or P2_3==2,P2_4.shown,P2_3.shown)}

You see that I always used numerical codes (easy, short)

1. The "forbidden" provider is one of the first three

2. The "forbidden" provider is NOT one of the first three

Joffm

you do it exactly as you explained it.

To store the result, you may create a hidden question of type "multiple short text" with three subquestions (QHidden).

Now ise an equation to fill these three places.

The first.

You know:

If "provider 2" is ranked first you have to take the second ranked.

{QHidden_1=if(P2_1==2,P2_2.shown,P2_1.shown)]

The second:

If "provider 2" is ranked first or second you have to take the third ranked else the second.

{QHidden_2=if(P2_1==2 or P2_2==2,P2_3.shown,P2_2.shown)}

And at last the third place

{QHidden_3=if(P2_1==2 or P2_2==2 or P2_3==2,P2_4.shown,P2_3.shown)}

You see that I always used numerical codes (easy, short)

1. The "forbidden" provider is one of the first three

2. The "forbidden" provider is NOT one of the first three

Joffm

*Volunteers are not paid.*

Not because they are worthless, but because they are priceless

Not because they are worthless, but because they are priceless

##### Attachments:

Last edit: 1 month 2 weeks ago by Joffm.

Please Log in to join the conversation.

1 month 2 weeks ago #221124
by Fran1991

Replied by

*Fran1991*on topic*exclude a variable by substitution*
Hi joffm,

Thanks for your help.

I have a question, I forgot to mention that the following questions are on a 10 point scale.

P3. How likely are you to recommend vendor 1?

P4. How likely are you to recommend provider 2?

P5. How likely are you to recommend vendor 3?

So I did this for all 16 providers. and my idea was to show it with relevance.

So I don't know exactly how to filter the first 3 ranked in P2. not counting the supplier 4.

Thanks again.

I will try to do it as you mentioned before.

Thank you again for your help in finding the right path.

Greetings.

Thanks for your help.

I have a question, I forgot to mention that the following questions are on a 10 point scale.

P3. How likely are you to recommend vendor 1?

P4. How likely are you to recommend provider 2?

P5. How likely are you to recommend vendor 3?

So I did this for all 16 providers. and my idea was to show it with relevance.

So I don't know exactly how to filter the first 3 ranked in P2. not counting the supplier 4.

Thanks again.

I will try to do it as you mentioned before.

Thank you again for your help in finding the right path.

Greetings.

Please Log in to join the conversation.

1 month 2 weeks ago #221125
by Joffm

Replied by

*Joffm*on topic*exclude a variable by substitution*
No matter, what type the following questions are.

You have the three providers stored and may use them whereever and however you want.

JOffm

You have the three providers stored and may use them whereever and however you want.

JOffm

*Volunteers are not paid.*

Not because they are worthless, but because they are priceless

Not because they are worthless, but because they are priceless

The following user(s) said Thank You: Fran1991

Please Log in to join the conversation.

1 month 2 weeks ago #221126
by Fran1991

Replied by

*Fran1991*on topic*exclude a variable by substitution*
Thank you very much Joffm.

You help me a lot with your knowledge.

A hug .

You help me a lot with your knowledge.

A hug .

Please Log in to join the conversation.

1 month 2 weeks ago #221155
by Fran1991

Replied by

*Fran1991*on topic*exclude a variable by substitution*
Hi joffm.

I hope you have a little patience for me.

I tell you that I have done some tests according to the equation that you have helped me to share, however, it has not been possible to register the providers as you put me in your example.

It will be that something is not executing well, or the problem will be something on my side.

I leave you an lss file with only the three questions so that the problem can be identified.

I am very grateful for your valuable help.

Greetings,

I hope you have a little patience for me.

I tell you that I have done some tests according to the equation that you have helped me to share, however, it has not been possible to register the providers as you put me in your example.

It will be that something is not executing well, or the problem will be something on my side.

I leave you an lss file with only the three questions so that the problem can be identified.

I am very grateful for your valuable help.

Greetings,

Please Log in to join the conversation.

1 month 2 weeks ago #221157
by Fran1991

Replied by

*Fran1991*on topic*exclude a variable by substitution*
Hi joffm,

I could not do it as in the example you share with me.

But if someone serves you ...

As I have each fixed provider, that is, each provider has its own variable, I was guided by Joffm's example and in each relevecian equation I used something like this.

if (P2_4.NAOK == 1 or P2_4.NAOK == 2 or P2_1.NAOK == 3, P2_1.NAOK == 1 or P2_1.NAOK == 2 or P2_1.NAOK == 3 or P2_1.NAOK == 4 , P2_1.NAOK == 1 or P2_1.NAOK == 2 or P2_1.NAOK == 3 or P2_5.NAOK == 4)

So if the supplier 4 is within the first three places, it will be replaced by the supplier to which we refer if it is in position 1,2,3, and 4.

Thank you joffm for your great help.

I could not do it as in the example you share with me.

But if someone serves you ...

As I have each fixed provider, that is, each provider has its own variable, I was guided by Joffm's example and in each relevecian equation I used something like this.

if (P2_4.NAOK == 1 or P2_4.NAOK == 2 or P2_1.NAOK == 3, P2_1.NAOK == 1 or P2_1.NAOK == 2 or P2_1.NAOK == 3 or P2_1.NAOK == 4 , P2_1.NAOK == 1 or P2_1.NAOK == 2 or P2_1.NAOK == 3 or P2_5.NAOK == 4)

So if the supplier 4 is within the first three places, it will be replaced by the supplier to which we refer if it is in position 1,2,3, and 4.

Thank you joffm for your great help.

Please Log in to join the conversation.

1 month 2 weeks ago #221160
by Joffm

Replied by

*Joffm*on topic*exclude a variable by substitution*
Hi,fran

1.

This equation is used to fill the text question

2. I wrote

{QHidden_1

But you inserted

{QHidden_1

One "=" sign assigns a value, but you tried to do a comparison "==".

Joffm

1.

These are two questions, the multiple text AND an equation.create a hidden question of type "multiple short text" with three subquestions (QHidden).

Now use an equation to fill these three places.

This equation is used to fill the text question

2. I wrote

{QHidden_1

**=**if(P2_1==2,P2_2.shown,P2_1.shown)}But you inserted

{QHidden_1

**==**if(P2_1==2,P2_2.shown,P2_1.shown)}One "=" sign assigns a value, but you tried to do a comparison "==".

Joffm

*Volunteers are not paid.*

Not because they are worthless, but because they are priceless

Not because they are worthless, but because they are priceless

##### Attachments:

Please Log in to join the conversation.