Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
D19PAL
Creator II
Creator II

Line chart, trying to add two measures

Hi Guys,

Line chart, trying to add two measures, 1 measure works perfect on its own, but if I try to add two of them together, I'm not getting all the fields from the Dimension that I'm using.

This is the 1st measure

 avg(cost)/avg(weight)

This is 2nd measure 

 avg(cost_new)/avg(weight_new)

They work alone, but when I do this

 avg(cost)/avg(weight)  + avg(cost_new)/avg(weight_new)

I'm only getting the Dimension fields from one of the measure, not both.

I hope someone can resolve this.

 

Thanks 

 

 

 

 

 

 

 

 

1 Solution

Accepted Solutions
MikeA
Contributor III
Contributor III

Could it be that one of the sides of the is trying to divide by zero and causing a null which then knocks out the other side of the expression?

try this - rangesum(avg(cost)/avg(weight),avg(cost_new)/avg(weight_new))?

View solution in original post

5 Replies
MayilVahanan

HI @D19PAL 

Try like below

(avg(cost)/avg(weight))  + (avg(cost_new)/avg(weight_new))

if not, can you give sample file

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
D19PAL
Creator II
Creator II
Author

Thanks 

 

But I tried that too, doesn't work 

D19PAL
Creator II
Creator II
Author

Anyone?  please lol

MikeA
Contributor III
Contributor III

Could it be that one of the sides of the is trying to divide by zero and causing a null which then knocks out the other side of the expression?

try this - rangesum(avg(cost)/avg(weight),avg(cost_new)/avg(weight_new))?

D19PAL
Creator II
Creator II
Author

Worked a treat.

 

Thanks