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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
mhmmd_srf
Creator II
Creator II

Multiplication Script having Issue

Hi All,

I have Quantity, Contract Margin in my DB. I am taking these field directly. I am doing on calculation in script level, like:

Quantity *  Contract Margin as Margin$.

But if I use this Margin$ field directly in my chart value is not matching. Like:

sum(Margin) -- it is not matching

Instead of that if I use base query in chart like :

sum(Quantity) * sum(Contract Margin) --- it is matching.

Can anyone suggest me why this is happening. How to resolve this.

Thanks,

Sarif

1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi Mohammad,

I think it's the expected behavior. For example, If you have a month as a dimension, and your field is Margin which is Quantity * Contact Margin,  The value of the month should be Quantity of month and Contact Margin of Month. So it should be sum(Quantity) * sum(Contract Margin).

I think it's not the mistake of the QlikView as it gives the values of your expression.

Just an opinion.

View solution in original post

1 Reply
Anonymous
Not applicable

Hi Mohammad,

I think it's the expected behavior. For example, If you have a month as a dimension, and your field is Margin which is Quantity * Contact Margin,  The value of the month should be Quantity of month and Contact Margin of Month. So it should be sum(Quantity) * sum(Contract Margin).

I think it's not the mistake of the QlikView as it gives the values of your expression.

Just an opinion.