Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Diinkant
Contributor III
Contributor III

Find the value of a field and enter that value into the cell

Hi Guys,

How do I find out what the value of a column is and use that outcome in an if statement to output the value i want into a cell.

Diinkant_0-1666747012813.png

In theory what I want to do is if(GetFieldSelections("Size Code",7),10). I would put this into my 'Test Sales' expression so that if the size code is 7, value 10 would be inputted into the cell and the rest would be blank. I have tried using most of the Get functions but i have a feeling i am doing something wrong.

If there is a better way to do this then let me know. The data type isn't going to be exactly the Size Code but using it so I can test if I can get the code to work.

Cheers

 

Labels (2)
1 Solution

Accepted Solutions
justISO
Specialist
Specialist

Hi, can it be that you don't need this GetFieldSelections(), and simple if() could work here fine as [Size Code] is dimension?, like  if([Size Code]=7, 10)

If yes, maybe you can try to use pick(match()) approach to avoid long ifififif in this case.

View solution in original post

2 Replies
justISO
Specialist
Specialist

Hi, can it be that you don't need this GetFieldSelections(), and simple if() could work here fine as [Size Code] is dimension?, like  if([Size Code]=7, 10)

If yes, maybe you can try to use pick(match()) approach to avoid long ifififif in this case.

Diinkant
Contributor III
Contributor III
Author

Legend mate, didn't know it would be as easy as an if else. Thought could get fancy and use the Get functions but didn't need too.

Thanks mate