Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
stephenhasson
Creator
Creator

Problem with conditional logic

Hi, in the attached, field ‘%-age of Total Hrs’ is correct, e.g.  14.78/1040.37*100 = 1.42%

For the figures shown (examples in yellow), I want to express the value of labour hours as a percent of the Indirect or Productive hours respectively (ie 1040 is a combination of 200 ‘I’ and 840 ‘P’ hours.

So, I need to combine some conditional logic in the calculation of these percentage. I’ve tried:

Sum([Labour Hrs])/Sum({$<[Labour Type]={'I'}>}(TOTAL([Labour Hrs]))*100

and some variations, but I can’t get the combination of TOTAL and the conditional function to work.

Can anyone please help, thanks.



2 Replies
sunny_talwar

May be this

Sum([Labour Hrs])/Sum(TOTAL <[Labour Type]> [Labour Hrs])*100

stephenhasson
Creator
Creator
Author

Thank you for your reply. I'll try this.