Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

paulyeo11
Valued Contributor II

Why need if(Sum([Sales Margin Amount])/Sum([Sales Amount]) < 0,0, before compute GP% ?

Hi All

I have notice that QS example expression on compute GP% as below ::-

if(Sum([Sales Margin Amount])/Sum([Sales Amount]) < 0,0,Sum([Sales Margin Amount])/Sum([Sales Amount]))

Usually i get below :-

Sum([Sales Margin Amount])/Sum([Sales Amount]))

Can some one share with me why need to add ?

if(Sum([Sales Margin Amount])/Sum([Sales Amount]) < 0,0,


I believe it is for remove those -ve GP%.


Paul