Setting up Loop & Merge in Qualtrics based on Displayed Choices in hidden question - loops

I have around 100 items from which I want each participant to rate a random subset of 5 with the same set of questions, without getting messy data files with many blank cells at the end of the study.
This is my first time using Loop & Merge and I did manage to put in all my items using Field 1 and then the piped text etc., but I realised this cannot evenly present items, so I came across this solution about creating a hidden question first – but I don’t understand how/ where to update my loop to loop based on the Displayed Choices in my hidden question.
Other links and ChatGPT give replies based on the old interface so I am a little lost.
Could anyone please help with that?

You do it in the Loop & Merge setup:

Related

Google Sheets Arrayformula Calculating Very Slow

I made a Google Sheet to track some metrics at my job. In a simple explanation, I create annotations (or tracks) on images and submit it for review. If it is reviewed and sent back to me, I fix it and add whatever I missed and send it back.
In order to track my progress, I wanted to create a formula that tracks how many total tracks I missed for each task (most recent attempt - earliest attempt). It took some finagling, but I finally got a formula that works. My only complaint is that it works extremely slow. Here is my formula:
=ARRAYFORMULA({"Number of Tracks Missed"; IF(NOT(ISBLANK($F$2:$F)), IF($G$2:$G = 1, 0, (VLOOKUP($F$2:$F,SORT($B$2:$C, $A$2:$A, FALSE), 2, FALSE)) - (VLOOKUP($F$2:$F, $B$2:$C, 2, FALSE))), "")})
Column G is a count of how many times I have worked on a task, so if I've only had it once, then I didn't miss anything so that equates to 0. If it's been more than once, I use a complicated VLOOKUP combined with a SORT that flips the list of my tasks to the reverse order, so the VLOOKUP will find the most recent attempt, then subtract my earliest attempt from it.
Like I said, this formula works and gives the correct response every time, it's just super slow. Is there a way I can speed this calculation up, or is this the best/only option I have? I'm somewhat new to using formulas like this, so any help is appreciated.
EDIT:
Thanks to player0 for pointing me in the right direction. My formula was fine, the problem was all the extra rows I had in the sheet. For some reason, There were 32,000+ rows. With the Arrayformula calculating for every single one, even if it's just with blanks, it was taking a long time.
As soon as I deleted the extras, it now calculates almost immediately.
somewhere along the path of creation of your sheet an error occurred and added 32k of empty rows to the sheet which caused you that decreased response.
if you don't need so many rows - delete them. your formula is fine.

Looping and selectig different value in each line

I have a problem that I think would be solved relatively quickly with a loop. I have to work with SPSS and I think it can only be solved in syntax.
Unfortunately I am not good with loops, so I hope that one of you can help me.
I have done a study on reasons for abortions. Now I would like to present the distribution of reasons.
The problem is that each person was first asked about all their pregnancies (because this is also relevant for the later analysis), then the pregnancy was determined to which the questionnaire will further refer.
So the further questionnaire was only about one of the pregnancies, whereas the first questions (f.ex. year of pregnancy, reason for abortion) were answered for each pregnancy. For the reasons I only need the information that refers to the pregnancy that was also used for the further questionnaire.
I have an index variable that determines the loop at which pass the relevant pregnancy is asked ("index"). Then I have the variable "Loop_1_R" to "Loop_5_R" which queries the reasons for each up to 5 abortions (of course, for each woman, only the number of pregnancies that she also indicated). In between there are some missing data, for ex. it could be that a woman said that she had 5 pregnancies, but only two of them were abortions (f.ex. the third and fifth). So then she would only give reasons for an abortion in loop3 and loop5.
Now I want to create a new variable which contains only the reason which refers to the relevant pregnancy. So for each woman only one value. I was thinking, you could build a loop in the sense of calculate new variable in such a way that loop i is taken at index i.
I could of course do it by hand, but with a VPN count of over 3000 it will obviously take considerably longer.
I hope someone can help me! This is an example dataset with less loops and VPN:
You can use do repeat to loop and catch the value you need this way:
do repeat vr=Loop_1_R to Loop_5_R/vl=1 to 5.
if Index=vl reason=vr.
end repeat.

Ive got a pipe that consists of 5 pieces, each including 5 properties

Inlet -> front -> middle -> rear -> outlet
Those five properties have a value anything between 4 - 40. Now i want to calculate a specific match for each of those values that is either a full 10 or a 5 when a single property is summed from each pipe piece. There might be hundreds of different pipe pieces all with different properties.
So if i have all 5 pieces and when summed, their properties go like 54,51,23,71,37. That is not good and not what im looking.
Instead 55,50,25,70,40. That would be perfect.
My trouble is there are so many of the pieces that it would be insane to do the miss'matching manually, and new ones come up frequently.
I have manually inserted about 100 of these already into SQLite, but should be easy to convert into any excel or other database formats, so answer can be related to anything like mysql or googlesheets.
I need the calculation that takes every piece in account and results either in "no match" or tells me the id of each piece that is required for a match and if multiple matches are available, it separates them.
Edit: Even just the math needed to do this kind of calculation would be a lot of help here, not much of a math guy myself. I guess there should be a reference piece i need to use and then that gets checked against every possible scenario.
If the value you want to verify is in A1, use: =ROUND(A1/5,0)*5
If the pipes may not be shorter than the given values, use =CEILING(A1,5)

How to repeat a command on different values of the same variable using SPSS LOOP?

Probably an easy question:
I want to run this piece of syntax:
SUMMARIZE
/TABLES=AGENCY
PIN
AGE
GENDER
DISABILITY
MAINSERVICE
MRESAGENCY
MRESSUPPORT
/FORMAT=LIST NOCASENUM TOTAL
/TITLE='Case Summaries'
/MISSING=VARIABLE
/CELLS=COUNT.
for 264 different agencies which are all values contained in the variable 'AGENCY'.
I want to create a different table for each agency outlining the above information for them.
I think I can do this using a DO REPEAT or LOOP on SPSS.
Any advice would be much appreciated.
Thank you :)
note: I have Google'd and read endless amounts on looping I am just a little unsure as to which method is what I am looking for
Take a look at SPLIT FILE, which meets your needs

Angular UI Bootstrap TypeAhead for Multiple Arrays

Having an issue getting the Typeahead feature working properly in UI-BootStrap with large datasets. I've got nearly 92,000 records coming back and it seems the maximum number of records that can be in an Array is 10000. So that means I have 10 arrays that contain data.
However, currently I am only able to search through any one Array...so if I set it to response.data[0] that means I am going to be missing 81,000+ records to run typeahead on...
I'm sure there has to be a way to set it so that it can:
A) Either put the data in a single array for it to work with
OR, preferably:
B) wait until the user types in a certain number of keystrokes, say 3, and then do a "Get" call to the server with that data, and only bring back the data that matches those 3 keystrokes, which will likely be far lower than 10,000 items for it to search through...
Can anyone help with either scenario? Preferably Scenario B?

Resources