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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Min value in set analysis

Hi all, could some body help me whit this, I have this expresion,

sum

({$<AGRUPADOR={'01_VENTAS'}>}DATA_AVER)

/

SUM ({$<AGRUPADOR={'01_VENTAS'}>}Total DATA_AVER)

What I need is to get the minimum value of the expresion, I tryed with a variable but doesn´t work.

vVar =

sum({$<AGRUPADOR={'01_VENTAS'}>}DATA_AVER)

/

SUM ({$<AGRUPADOR={'01_VENTAS'}>}Total DATA_AVER)

=min($(vVar))

any ideas??

1 Solution

Accepted Solutions
Not applicable
Author

Hola Javier,

Ya trataste con

MIN(Total AGGR(sum( (DATA)/ (DATA TOTAL) ),dimensión))  ?

La dimensión es muy importante, no sabemos como está definido el conjuno al que se le busca el mínimo.

Espero que ayude la idea.

Saludos

View solution in original post

2 Replies
ToniKautto
Employee
Employee

Please notice that Sum() is an aggregation funciton which will return a numeric value, and not a range of values in a vector. This means that your variable vVar will have a numric valu or NULL (if the denominator sum() is 0). If you are trying to find the min value you first of all need to look in a range of values like in a field or an aggregated vector by using aggr().

It is a bit unclear what the surrounding conditions are in this case, and what value your are expecting to get, so please provide a sample QVW with data and the related object to enable a more detailed feedback and guidance.

Not applicable
Author

Hola Javier,

Ya trataste con

MIN(Total AGGR(sum( (DATA)/ (DATA TOTAL) ),dimensión))  ?

La dimensión es muy importante, no sabemos como está definido el conjuno al que se le busca el mínimo.

Espero que ayude la idea.

Saludos