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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
liucia_liucia
Partner - Contributor II
Partner - Contributor II

Division of two columns

Hello,

I need to divide two different column values: quantity and sales and make a new column of unit_price. When I do this: quantity/sales I get an empty unit_price column. What should I do?

Labels (2)
2 Replies
mpc
Partner Ambassador
Partner Ambassador

Hi, 

You need to aggregate it like sum(sales/quantity) as unit_price

Best

mpc
Muthukumar_77
Contributor III
Contributor III

Hi,

Put like this, Sum(quantity)/Sum(sales) as unit_price 

Thanks Regards,
Muthukumar P
Qlik Developer