Skip to main content
Announcements
YOUR OPINION MATTERS! Please take the Qlik Experience survey you received via email. Survey ends June 14.
cancel
Showing results for 
Search instead for 
Did you mean: 
yashcena
Contributor III
Contributor III

Sum of Hours using Set Analysis to ignore two fields

Hi,

I have the following data in my app (mockup):

Capture.JPG

I have to show the sum of hours for each month. But while doing so, I have to ignore the hours that the 'Contractor' ResourceType has charged on Project 'XX'.

Capture2.JPG

 

On Project XX, 'Contractors' have charged 6 hours in Jan, 16 hours in Feb, and 13 Hours in Mar.

Therefore,

Totals Hours in Jan should be (49-6) = 43 Hours

Totals Hours in Feb should be (78-16) = 62 Hours

Totals Hours in Mar should be (59-13) = 46 Hours

 

Capture3.JPG

What should be the syntax to filter out "Contractor' Hours from Project 'XX'?

 

Thanks in advance!

 

YASH

Labels (3)
2 Replies
santhiqlik
Creator
Creator

Hi,

I got the solution by summing up below 2 expressions. Not sure if there is any better solution for this.

 sum({<ResourceType={'Employee'},Project={'XX'}>} Hours) + sum({<Project-={'XX'}>} Hours)

Attached is your updated qvw.

 --Priya

sunny_talwar

You can try this

Sum({$-<ResourceType = {'Contractor'}, Project = {'XX'}>}Hours)

image.png