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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to Retrieve values from a variable?

Hi All,

I have a variable in which comma separated values get appended. Is there any way by which I can retrieve the latest appended value and Display it in a text box?

Thanks in Advance.

Regards,

Pratik

1 Solution

Accepted Solutions
marcus_sommer

Try this:

subfield(YourVariable, ',', -1)

- Marcus

View solution in original post

5 Replies
marcus_sommer

Try this:

subfield(YourVariable, ',', -1)

- Marcus

Not applicable
Author

Hi,

I am Using FieldValueCount function in Load Script..

Let var1=FieldValueCount(ID);

what if I want to give an if condition in Load Script?

Like if there is another dimension Dept.

So wht will the syntax be if I want the fieldValue count of ID where Dept is Finance?

Please Help

marcus_sommer

I think you will need a load for this:

t1:

Load count(distinct ID & Dept) as Count_IDDept Resident xyz where Dept = 'Fianance';

You could this use as field or write it per peek() in a variable.

- Marcus

Not applicable
Author

Hi Marcus, thanks for the reply it worked with the above expression but I want to put a condition on date field as well its showing error then..

below is my Script.

temp:

Load count(distinct ID & [Dept] & [Joining Date]) as Count_IDDept Resident MyTable where [Joining Date]>=weekstart(date(now()),-1) & [Dept] = 'Finance';

It says "Garbage after  Statement

temp:

Load......"

marcus_sommer

I think it's the "&" which meant a string-concat - you need a "and":

temp:

Load count(distinct ID & [Dept] & [Joining Date]) as Count_IDDept Resident MyTable where [Joining Date]>=weekstart(date(now()),-1) and [Dept] = 'Finance';

- Marcus