Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Fieldindex and fieldvalue.

Hi,

In my load script I am loading the following values (parameters):

LOAD * INLINE [

    F1, F2

    a, 10

    b, 20

    c, 30

    d, 40

    e, 40

    f, 30

    g, 20

    h, 10

];

In my presentation I want to access the F2-value of F1-'f' and tried the following:

FieldValue('F2', FieldIndex('F1','f')) - but this does not give the desired result.

I can see why this happens, since there are duplicate values in the F2-column, so you end up with 8 rows in the F1-column, but only 4 rows in the F2-column, due to QV's elimination of duplicates.

Is there a way of getting to the correct value for my 'f'-record?

Example is attached as well

Help is highly appreciated

Best regards

Steen Olesen

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

try this:

only({<F1={'f'}>}F2)

c u,

Stefano.

View solution in original post

3 Replies
Not applicable
Author

Hi,

try this:

only({<F1={'f'}>}F2)

c u,

Stefano.

Not applicable
Author

Hi Steen

Please use =only(F2) in a text object.

Is this what you need?

Thanks

Priya

SunilChauhan
Champion
Champion

try one of below

if(F1='f',F2)

or

sum( if(F1='f',F2))

Sunil Chauhan