Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

lylererger
Contributor II

Conditional Expression

Hi.
I'm searching for the way to show dimention value in text box.
I've got currency rates by banks in single table. And my problem is to show the bank with the best rate.
My expression looks like: max(aggr(sum(Rate),Bank)).

Thnx.

Tags (1)
1 Solution

Accepted Solutions
bertdijks
New Contributor III

Re: Conditional Expression


HI See Attached example,

I loaded a few Lines

LOAD * INLINE [
    Bank, Rate
    A, '0,7'
    B, '0,8'
    C, '0,5'
    D, '1,2'
    E, '1,1'
]
;

I want Bank D to show as the bank with the highest rate

First I determen the row containing the highest rate:

fieldindex( 'Rate', max(Rate) ))--> row number 4

Finnaly I retrieve the value of Bank in the 4th row:

Fieldvalue('Bank',fieldindex( 'Rate', max(Rate) ))

Kind regards,

Bert

6 Replies
thornofcrowns
Valued Contributor II

Re: Conditional Expression

And what does that expression bring back?

lylererger
Contributor II

Re: Conditional Expression

Best Banks Rate I think.

anbu1984
Honored Contributor III

Re: Conditional Expression

Can you post your data, Current result and Expected result?

fkeuroglian
Honored Contributor

Re: Conditional Expression

Please put an example to understando and can help you

lylererger
Contributor II

Re: Conditional Expression

I hope it helps.

bertdijks
New Contributor III

Re: Conditional Expression


HI See Attached example,

I loaded a few Lines

LOAD * INLINE [
    Bank, Rate
    A, '0,7'
    B, '0,8'
    C, '0,5'
    D, '1,2'
    E, '1,1'
]
;

I want Bank D to show as the bank with the highest rate

First I determen the row containing the highest rate:

fieldindex( 'Rate', max(Rate) ))--> row number 4

Finnaly I retrieve the value of Bank in the 4th row:

Fieldvalue('Bank',fieldindex( 'Rate', max(Rate) ))

Kind regards,

Bert

Community Browser