Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
help4qv123
Creator II
Creator II

Set analysis max value

HI,

i have 3 columns..

By default i need a bar chart ,if u  select a key there is some max version for that key..i need the value of that version for all keys.

i have attached a sample for u..plz refer to that !

1 Solution

Accepted Solutions
jpenuliar
Partner - Specialist III
Partner - Specialist III

add Flag to rows:

data1:
NoConcatenate
load
key,
version,
value,
oder,
MaxVersion,
If(version = MaxVersion,1,0) as MaxVersionValues
Resident data
;

so now you dont have to drop the non-related rows. table looks below:

View solution in original post

22 Replies
Not applicable

You are using Sum(value), instead try max(value).

MayilVahanan

Hi

Try like this

=FirstSortedValue(value , - version)

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
help4qv123
Creator II
Creator II
Author

hi,

but i have an expression like count(value)...where max cant be applied

help4qv123
Creator II
Creator II
Author

thank you. but here in my sample it is value which picks max value..but i have order column..i need the count of order for each key with max version.

my expression is count(ordr)

Not applicable

I think MayilVahanan‌ had given correct solution.

help4qv123
Creator II
Creator II
Author

yes its right, but it doesnt work in count...suppose my expression is count(ordr)...which need to pick the max version. then what wil be the expression

Not applicable

something like this may be:

FirstSortedValue(aggr(count(value),version),-version)

help4qv123
Creator II
Creator II
Author

no bro its not working

jpenuliar
Partner - Specialist III
Partner - Specialist III

max({<version = {'=Max(version)'}>}value)