Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Domino3145
Contributor II
Contributor II

Create a field from a list of variables

Hi all,

I'm trying to convert a list of 6 number variables I've generated in script into a single field so I can use a Rank() function on them in the frontend.

Say I have: v1, v2, v3, v4, v5, v6. How do I go about converting this into a field that I can perform functions like Rank(), FieldValue() etc. on?

Labels (1)
1 Solution

Accepted Solutions
Digvijay_Singh

Not sure of your use case but check if you need something like below - 

let V1 = 1;
let V2 = 2;
let V3 = 3;
let V4 = 4;
let V5 = 5;
let V6 = 6;

table:
Load * inline [
Data
$(V1)
$(V2)
$(V3)
$(V4)
$(V5)
$(V6)
];

View solution in original post

2 Replies
Digvijay_Singh

Not sure of your use case but check if you need something like below - 

let V1 = 1;
let V2 = 2;
let V3 = 3;
let V4 = 4;
let V5 = 5;
let V6 = 6;

table:
Load * inline [
Data
$(V1)
$(V2)
$(V3)
$(V4)
$(V5)
$(V6)
];

Domino3145
Contributor II
Contributor II
Author

Hi, 

Thanks so much for the reply, thats mostly working out great! 

My only issue now is if two values are the same, one is lost in Load * Inline

It seems to be returning distinct values only, any ideas on how I could get around this?

Thanks again

 

EDIT:

Figured it out, thanks for the help!