Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Re-using numbers from one object into other objects

Dear Qlikview experts,

I have a straight table in which I have made some calculations. For this I have set the total on

'sum of rows' in the expression tab. I would like to use this number

in another chart for further calculations but when doing this with a macro

it doesn't work out as the macro uses the 'expression total' when the total is calculated.

IDPriceAmountGross


3.041€ 333.754
A1€ 215,40179€ 38.557
A2€ 447,80107€ 47.915
A4€ 109,1011€ 1.200
A5€ 92,402.454€ 226.750
A7€ 173,1019€ 3.289
A8€ 98,5045€ 4.433
A11€ 51,30220€ 11.286
A14€ 54,306€ 326

I would like to divide € 333.754/179 (of A1) but in another chart. How can I use the values to be incorporated in other charts? Any thoughts are highly appreciated.

Thanks in advance!

Regards,

Rishi

1 Solution

Accepted Solutions
sridhar240784
Creator III
Creator III

Rishi,

you mean that, you dont have any aggregation function in your expression?

Aggr(sum(mutiply Price*Amount),ID)

or

sum(Total<ID> mutiply Price*Amount)

Will this help you?

- Sridhar

View solution in original post

5 Replies
sridhar240784
Creator III
Creator III

Hi Rishi,

There is no functionality in Qlikview to use the one object data in to another object but Qlikview would allow you copy the expression from one chart to another chart. You should have arrived at this 333.754 with help of some expression.

You can use the same expression in to another char and you can do the calculation.

But to get this 333.754, you need to use "Total" Modifier in you exprssion or Aggr() function.

For Example, Your expression to get 33.754 is  = Sum(Gross) in Object 1.

Now to use this 333.754 in other chart, you need to tweak your expression like  Sum(Total<ID> Gross).

Hope this helps you.

-Sridhar

Not applicable
Author

Dear Sridhar,

Thank you for your reply. The code you suggested is working only if you want to sum

something depending on a simple sum or count. However if you would like to calculate

something covering multiple dimensions this won't work.

What I would like to do is to mutiply Price*Amount for every ID and the total sum of this

as shown in the table (which is 333.754). Any thoughts on how to do this?

Regards,


Rishi

SunilChauhan
Champion
Champion

create a variable for calculation and use the same where ever u want

Sunil Chauhan
sridhar240784
Creator III
Creator III

Rishi,

you mean that, you dont have any aggregation function in your expression?

Aggr(sum(mutiply Price*Amount),ID)

or

sum(Total<ID> mutiply Price*Amount)

Will this help you?

- Sridhar

Not applicable
Author

Sridhar,

Thanks for your feedback. I was almost there but you gave the last push in solving this issue. I fixed it with

sum(Total<ID> mutiply Price*Amount) where as in my first expression I didn't include the Amount.

Thank you very much Sridhar and have a good one!

Best Regards,

Rishi