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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
dandaanilreddy
Partner - Creator III
Partner - Creator III

Issue using variables

Hello All,

I have created 2 variables based on a field .  Variable 2 must show always A3 and variable 1 should show A0 or A3 based on user selection. If the user come and select A3 and A0  or A0 and A3 from the field the variables are populating as expected but when the user paste the cycles into the field the variables are showing in reverse order like variable 2 is showing A0 and variable 1 is showing A3. Please can someone help me on how to achieve this? Below is my variables.

vField =concat(distinct field,',')

Variable 1 : =subfield(vField,',',1)

Variable 2 : =subfield(vField,',',2)

 

Thanks

 

 

1 Reply
Anil_Babu_Samineni

To work as field, You must include Aggr() over Variables, Since Aggregate can't be achieve in the script, If u are using script side variables.

I would rather thing this way

vField =concat(distinct field,',')

Variable 1 : =subfield(Aggr(vField, field),',',1)

Variable 2 : =subfield(Aggr(vField, field),',',2)

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