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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
hico-mah
Partner - Contributor II
Partner - Contributor II

Evaluate function within a field name

Hi everybody,

I have to get a value from an existing field in the table, based on a function.

As an example:

test:

LOAD

SomeValue

   ,[Value_$(floor(SomeValue/3) + 1)]  AS  DependentValue;

LOAD

IterNo()  AS    SomeValue

    ,'a'   AS  Value_1

    ,'b'   AS  Value_2

    ,'c'   AS   Value_3

AUTOGENERATE 1

while IterNo() < 9;

the lower load Statement will create a table with 8 rows and 4 fields.. the upper Load Statement should now select one of these field values, depending on the first field.

the expecte result would be

test:

SomeValue | DependentValue

1 | a

2 | a

3 | b

4 | b

5 | b

6 | c

7 | c

8 | c

But I only get an Fielde "Value_" not found error, obviously the function is not evaluated correctly.

Thanks for any help

Michael

0 Replies