Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
ronaldwang
Creator III
Creator III

assigning value from table to a variable

I have a table where the information is sorted in a particular order. Is there a way I can assign a cell value in a particular position (eg, row 1 column 2) to a variable easily? thanks

8 Replies
luismadriz
Specialist
Specialist

Hi,

Maybe a double For loop and the Peek function?

Anil_Babu_Samineni

Title Looks like this?

LET Variable = Peek('TableName', FieldName, 3);

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
ronaldwang
Creator III
Creator III
Author

Thanks, I can do this in load script.

I should have made more clear that I want to assign table value to a variable where the table is in the front end. e,g a table where I have calculated the 50 percentile. if I can not achieve this then I will have to go back to insert this information into the original table.

Anil_Babu_Samineni

Can you come up with some sample data and result you want to store in variable, Please?

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
woshua5550
Creator III
Creator III

maybe a simple macro can help you , plz check my test file attached

ronaldwang
Creator III
Creator III
Author

the result table is as below and can be dilemma as user can change the date but the order will be the same, e,g sorting last column from high to low, and I want to assign variable for the 50 percentile of that column to a variable.

ThanksCapturedd.PNG

ronaldwang
Creator III
Creator III
Author

Thanks, that is a good way of doing it. just curious apart from using marco, any other way to achieve the result.

woshua5550
Creator III
Creator III

Concat () + Subfield() also works but there will be a lot of limitations

check "Method 2" in attachment