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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
thanhphongle
Creator II
Creator II

calculating two different result from different charts

hello comunity,

I have a qvw.file and need a solution for my problem

if you open the file you will see three straight charts.

i want to mulitply the result of     gew. Zins =110,13%  from straight chart 1 with the result of  durchschn. Kosten from straight 3 and call the result of both "general cost"

after i want to subtract the result of Gesamtkosten. zzgl ZV with the result of general cost and call it "New Cost"

can anyone help me out here?

i am a qvw debutant. i know that a solution would be manipulating the script. but actually i am not an expert in set anaylsis. so if anyone could attached me a solution with some explanations, that would be great!

14 Replies
thanhphongle
Creator II
Creator II
Author

I followed your instruction and tried to set the variables in the setting. it still doesnt work.

i created a new straight table called DURCHSCH. KOSTEN right at the bottom. the result should be 80440,00 EUR but it returns 0. what have i done wrong ?

i attached a new file "reedit2" could you check this out for me please?

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You didn't add any dimensions to that table. That's possible, but then you'll have to sum the values over those dimensions: =sum(aggr($(vdurchschnKosten),Kaufschein,[Serial Number],Position,Subposition))

And you need to remove the = sign in front of the expressions in the variables. Otherwise they won't be calculated in the context of the chart where they're used, but on the document level, i.e. without considering any dimensions.


talk is cheap, supply exceeds demand
thanhphongle
Creator II
Creator II
Author

hmm still doesnt work, could you attach me a qvw file with your solution?

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

See attached qvw


talk is cheap, supply exceeds demand
thanhphongle
Creator II
Creator II
Author

I attached a new qv file.

I created my variables by following your instructions

If I try to return vGewZins in an expression, so the expression should be like this?

=sum(aggr($(vGewZins),Kaufschein,[Serial Number],Position,Subposition))

somehow it doesnt return me 106,42%

I m not sure where mistake is again.

Moreover if i want to mulitply vPVKosten with vGew.Zins in an expression, so it must be like this? ->

(sum(aggr($(vGewZins),Kaufschein,[Serial Number],Position,Subposition))) * (sum(aggr($(vPVKosten),Kaufschein,[Serial Number],Position,Subposition)))

could u attach me your solution again, I m very thankful that you help me out here.