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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
raghavsurya
Partner - Specialist
Partner - Specialist

Pick Minimum Positive value

Hi All,

I am currently picking up minimum values among 3 variables with below mentioned Min function.

nummin (CVRev,CVP, CVEB, CVBV)

With one of the valubles returning negative value.... I need to pick minimum positive values. Can you please suggest how to modify the expression.

Regards,

Raghav

3 Replies
Not applicable

Hi,
Try this expression,

nummin (if(CVRev>0,CVRev),if(CVP>0,CVP),if(CVEB>0CVEB),if(CVBV>0,CVBV))

I know this might not be the most efficient way to do this but, nothing strikes me other than this.


-Haneesh

raghavsurya
Partner - Specialist
Partner - Specialist
Author

Thanks Haneesh...... its working Big Smile

Regards,

Raghav

Not applicable

Yeah, this one will definitely work. But, the expression is complex as it has to call the if condition 4 times for every row and this can consume more memory if the data volume is high.

As a best practice, it is advisable not to use such complex statements. In this case, I guess we don't have any other option now 🙂

Cheers,

Haneesh