Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Div function always results Zero when denominator is greater than numerator

Hi,

I am using "straight table" chart which has couple of columns. For one column I am using the expression like

Div(value_numerator, value_denominator).

Div(3,8) gives me '0' and not 0.375

I need the values in % format. So I can do, Div(value_numerator * 100, value_denominator), but when I select 'Show in Percent' in 'Number' tab in the properties, it again multiply my result with 100 giving 3750%. All I need is 37.5%.

Thanks in advance for your help.

-Harkumar

2 Replies
m_woolf
Master II
Master II

The help file says

"Integer division. Both parameters are interpreted as real numbers, i.e. they do not have to be integers. The result is the integer part of the result of the arithmetic division, a real number. "

Why not just do A/B?

Not applicable
Author

Thansk, this is helpful.