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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Minimum value different from 0

This expression is OK but doesn't work properly.

if([ENERGY YELDED]>0,(max([ENERGY YELDED]))-min([ENERGY YELDED]))

I want that the expression does not consider the value 0 and the a minimum value different from 0

For examplie :

ENERGY YELDED value : 

4

7

12

0

5

9

MAX = 12   MIN = 4   =  MAX - MIN = 8

Anybody can help me?

Thanks

Labels (1)
1 Solution

Accepted Solutions
Luis_Cortizo
Employee
Employee

Another way to do the same:

=Max([ENERGY YELDED])-Min( {<[ENERGY YELDED]= {"=Min([ENERGY YELDED])>0"}>} [ENERGY YELDED])

View solution in original post

4 Replies
lironbaram
Partner - Master III
Partner - Master III

=

if(min([ENERGY YELDED ])=0,max([ENERGY YELDED ])-min([ENERGY YELDED ],2),max([ENERGY YELDED ])-min([ENERGY YELDED ]))

Luis_Cortizo
Employee
Employee

Another way to do the same:

=Max([ENERGY YELDED])-Min( {<[ENERGY YELDED]= {"=Min([ENERGY YELDED])>0"}>} [ENERGY YELDED])

Anonymous
Not applicable
Author

Thanks Icz,

works great !

Anonymous
Not applicable
Author

i tried this expression but doesn't work....

Thanks anyway