Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
bsbernabe
Creator
Creator

how to get field

Hello There,

i have concern regarding this below i don't know how o do this.

=IF([Field1]='SUP' get this field [Field3])

=IF([Field4]='MGR' get this field [Field4])

Best Regards,

Bing

10 Replies
Anil_Babu_Samineni

May be this

=IF([Field1]='SUP', [Field3]) as fieldname

=IF([Field4]='MGR', [Field4]) as fieldname2

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
bsbernabe
Creator
Creator
Author

Thanks Anil,

Not possible that, what i want for this is that IF([Field1]='SUP' i want to get the value of this [Field3]), but any way thank you

Anil_Babu_Samineni

What i provide willfor deserve the same. Are you still facung thw issue after using the constant. Will uu provide image

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Digvijay_Singh

Can you share the exact need, In normal scenario in the qlik script one row of source data is processed together and creates one record in Qlik table, so what if one record as Field1 ='SUP' and next record doesn't, but Field3 will be  created by any means once it is defined in the script in the load statement.

Digvijay_Singh

You can  drop the field later after the load using DROP statement by checking if Field3 has any value loaded.

vishsaggi
Champion III
Champion III

You want these two expressions in the chart or in Load script? Or you are trying to do a nested if?

jonathandienst
Partner - Champion III
Partner - Champion III

In a load script, something like:

...

If(Field1 = 'SUP', Field3, If(Field4 = 'MGR', Field4)) as Result,

...

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
bsbernabe
Creator
Creator
Author

Thank you so much for all of you guys i already fixed this concern

vishsaggi
Champion III
Champion III

Can you close the thread marking helpful responses and post your solution how you fixed so that other developers can know when they come across this thread.