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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis confusion

I am not sure how to make this work, and i am sure there are some perfectly good logic to make this work but i cant seem to figure it out.So was hoping someone here in the Community coulde look at my example and explain to me what i need to do to make it show the correct data, preferably with a working example and why it work.

If you look in the Attached qvw i have created the a pivot table.

I got these basic Fields:

  • ShipmentID
  • Customer
  • SLA
  • Packages

I want the view to be as it is when i dont have any selections, but when i select a customer i want it only to show the shipments related to that customer. This "Works" now, but when i Select a customer the 'Total Packages' and '% Packages' Expressions is wrong.

How shoulde i use set analysis to make this work? or are there some other way to make this work?

-Lasse Rolstad

Labels (1)
1 Solution

Accepted Solutions
rubenmarin
MVP
MVP

Hi Lasse, please check attachment if this is what you want

Total expression: =If(not IsNull(Customer), sum(TOTAL <ShipmentID> {<Customer>} Packages))

% expression: (Sum(Packages)/sum(TOTAL <ShipmentID> {<Customer>} Packages))

View solution in original post

4 Replies
Josh_Good
Employee
Employee

Hi Lasse,

There doesn't appear to be any data in your qvw.  You can edit your post on the right hand side under the Action menu. 

-Josh
Qlik

Not applicable
Author

Yes. sorry about that. I have uploaded the correct qvw.

rubenmarin
MVP
MVP

Hi Lasse, please check attachment if this is what you want

Total expression: =If(not IsNull(Customer), sum(TOTAL <ShipmentID> {<Customer>} Packages))

% expression: (Sum(Packages)/sum(TOTAL <ShipmentID> {<Customer>} Packages))

Not applicable
Author

Yes that was exatly what i needed, i been trying for quite some time to get it to work.

Thank you, looks so easy when i read it now