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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Associate two distinct dimensions

I'm going to try to explain my issue, but I know it will be a little abstract.  For the following table:

ProductCostInput Die
MSM9615$20Saturn
Saturn$5N/A

I want a bar chart that sums up the cost by product, but if there is an Input Die associated with the Product, I would also like to find that cost and aggregate it.  So, "Input Die" is not only a text attribute to "Product", but also a "Product" itself.  Ideally, I would have a bar chart with MSM9615 cost = $25 (because its Product cost is $20 and its Input Die cost is $5).

How can I do this?  Should I approach it in the chart expression or in the script editor?

Thank you!!

Susan

1 Reply
Anonymous
Not applicable
Author

I would handle this in the script by loading the table again, adding another column for the cost associated with the input die.  Something like:

Fact:
LOAD Product,
    
Cost,
    
InputDie
FROM Table;


LEFT JOIN  (Fact)
LOAD Product AS InputDie,
    
Cost AS InputDieCost
FROM Table;

Then you could create an expression that adds the columns together for your bar chart.