Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor II
Contributor II

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
Highlighted
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

Highlighted

You can try this

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

image.png