Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

kunkumnaveen
Contributor III

how to pick a value

Hi All,i need help in one of my requirement,for example i got like below

Place       customer                       value

LP               fox                             1000

LP               fox                             2000

LP               fox                             3000

LP               happy                         8000

LP               happy                         6000

LP               happy                         7000

DS               fox                             10000

DS               fox                             90000

DS               fox                             30000

DS               happy                         10008

DS               happy                         1032

DS            happy                         1067


so now i need to write a expression in a way that,if i select

LP value from Place field and fox as customer then it should pick one value from the above three values (1000,2000,3000)

LP value from Place field and happy as customer then it should pick one value from the above three values (8000,6000,7000)

i mean the expression should be dynamic .....

Note :This is just a sample values ,In client data i got more value (more then 3)for each customer .......



thanks

naveen


1 Solution

Accepted Solutions
MVP
MVP

Re: how to pick a value

Try using =Max(value) as an expression.

9 Replies
MVP
MVP

Re: how to pick a value

naveen kumar wrote:

if i select

LP value from Place field and fox as customer then it should pick one value from the above three values (1000,2000,3000)

'one value' - which one, do you have a logic for that?

kunkumnaveen
Contributor III

Re: how to pick a value

HI

LP value from Place field and fox as customer then it should pick any one value from the above three values (1000,2000,3000)


i mean it can show either 1000 or 2000 or 3000

MVP
MVP

Re: how to pick a value

Try using =Max(value) as an expression.

kunkumnaveen
Contributor III

Re: how to pick a value

I tried =max(value) ,instead of displaying the max value from (1000,2000,3000) it giving out 3 as value

MVP
MVP

Re: how to pick a value

Where are you using this expression? in a chart? if so what are the dimensions are you using? Could you post a sample qvw?

MVP
MVP

Re: how to pick a value

That's not consistent with the data in your original post, so there is more to this. If the possible values are 1000, 2000, 3000, then Max(value) will return 3000.

I suggest that you upload a small sample qvw with representative data showing where you get 3 instead of 3000.

Preparing examples for Upload - Reduction and Data Scrambling

shraddha_g
Honored Contributor III

Re: how to pick a value

Have a look.

kunkumnaveen
Contributor III

Re: how to pick a value

yes in a bar chart ,

dimension : Place

expression:=max(value)

MVP
MVP

Re: how to pick a value

There is definitely something that is being missed. Try to share your sample qvw to look into.

Community Browser