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: 
HarryLouis
Contributor II
Contributor II

Set analysis - Ignore user selection of dimension in measure calculation, but apply it to the straight table

Hi all,


I hope anyone can help me out with getting the set analyis / total correct on this. I have a table in my data model like below (simplified):

Part raw material cost
A aa 5
A bb 5
B aa 10
C cc 20

 

I am trying to output a table which sums the cost values of the raw material by Part:

PN total_cost
A 10
B 10
C 20

 

This can of course be achieved by using the function Sum (cost). However when applying a selection to the raw material (e.g. raw material = aa), the user expects the result in the bottom table to remain the same.

To do this, I would apply sum( {<rm_pn=>} cost). Although it provides the expected outcome (e.g. 10 for A and 10 for B), it will still show C with a total_cost of 0.

The expected output is that the applied selection of raw material is disregarded in the calculation of total cost, but the table shown will only still show PN A and B.

Would really appreciate very much if anyone can help!

Thanks,

Harry

Labels (1)
10 Replies
HarryLouis
Contributor II
Contributor II
Author

Thanks. I am a bit short on time this week to produce a sample QVF - also I have gotten to the required result now.

The reason why I applied the aggr( is because the total_rm_move_cost and repair order ID come from different tables with different hierarchies. Hence the Aggr() seemed to me the fastest and correct sollution for creating the summary by PN.