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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Refer to expression in other chart

Is it possible to refer to an expression in an other chart? I can't reuse the same expression.

17 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

BTW if you use a pivot table, you don't need two objects. A single pivot table can produce different values depending on which levels are expanded.

Not applicable
Author

You are right, the numbers that are summing the sales and volume should be the same as in chart 1 but I used random numbers so that's my mistake!

Thanks for the idea, I think that the TOTAL will work for me, do you know how I can use this in my expression when also working with variables to divide sales by volume?

Peter_Cammaert
Partner - Champion III
Partner - Champion III

I don't like copying the data from a screenshot. Can you post the output of your second chart as text (or an xlsx)?

Not applicable
Author

Thanks! I now wrote this code in the variable:

aggr( $(v_Sales) / $(v_Volume), Product Hierarchy level 1)

This code works, but not anymore when I click on a Product Hierarchy level 2. Is there anything I can do to change this?

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Ok, check this one out (multiple solutions):

Refer to Expression in another chart thread259135.jpeg

avinashelite

You want to ignore the Product Hierarchy level 2 selection in the calculation ? then add the Product Hierarchy level 2 in set analysis with {<Product Hierarchy level 2,rest_filter >}

Not applicable
Author

Yes that is what I want, where can I add this part of code to exclude level 2? It now looks like this:
aggr( $(v_Sales) / $(v_Volume), Product Hierarchy level 1)

avinashelite

v_Sales = you have the definition for this variable rite ? e.g sum(sales )? then try like this sum({<Product Hierarchy level 2=}Sale)