Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

trishita
Contributor III

Problem in multiplying 2 quantities which return null

I am encountering problems in multiplying two quantities in a table box. My expression:

num([Share_HPPD%]*[Total Commit]) which returns null or zero.

What could be the possible problem and solution?

shares.JPG

1 Solution

Accepted Solutions
amrinder
Contributor

Re: Problem in multiplying 2 quantities which return null

Make Sure your %Share values are in number format..At script level use num function on %Share field and then see if values are being calculated in chart.

6 Replies
amrinder
Contributor

Re: Problem in multiplying 2 quantities which return null

Hi,

Try this:

Sum([Share_HPPD%])*Sum([Total Commit])

trishita
Contributor III

Re: Problem in multiplying 2 quantities which return null

The problem is even if I am multiplying [Share_HPPD%]* 1, I am getting 0
amrinder
Contributor

Re: Problem in multiplying 2 quantities which return null

Make Sure your %Share values are in number format..At script level use num function on %Share field and then see if values are being calculated in chart.

Highlighted
MVP
MVP

Re: Problem in multiplying 2 quantities which return null

I guess if you just use the fieldname as expression, you would still get null. And that would be possibly because there are more than one possible values in that data junction (in specific cell). And qlik would not show you multiple values or a result coming from multiple values in one cell unless you use any aggregation function (sum, concat, count.. ex.). Hope this helps.

trishita
Contributor III

Re: Problem in multiplying 2 quantities which return null

how can i see this? I mean in qvd preview they are showing as num values only
trishita
Contributor III

Re: Problem in multiplying 2 quantities which return null

I have used sum fucntion but still it is returning 0 when multiplied with any number