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: 
paulyeo11
Master
Master

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

0 Replies