Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good Afternoon! I am new to Qlikview and am having some issues with an expression calculation in my chart. I need to allow the calculation to be dynamic when different dates are selected.
The purpose of the chart is to show the actual activity an employee has done side by side with the employees expected activity during a 40 hour work week. We show 40 hours for full time employees, 30 hours for part-time employees, and an average for the other categories. We also want to allow a percentage of time for new employee ramp up in the calculation.
The issue that I'm currently having is that the chart seems to only be using the last condition in the entire statement. Can anyone please assist? I'm sure there is something in the syntax causing the issue. I have tried rewriting it several different ways but am still having issues with the chart showing the data with the conditional logic.
=IF(WorkerCategory= 'CategoryA' and NewEmp=0 and IsEmployeeTypeA=0,sum(Hrs)/(GetSelectedCount(Date)/7)/40
,IF(WorkerCategory= 'CategoryA' and NewEmp=1 and IsEmployeeTypeA=0,40*(GetSelectedCount(Date)-DaysSinceProductive/(GetSelectedCount(Date)))
,IF(WorkerCategory= 'CategoryB' and NewEmp=0 and IsEmployeeTypeA=0,sum(Hrs)/(GetSelectedCount(Date)/7)/30
,IF(WorkerCategory= 'CategoryB' and NewEmp=1 and IsEmployeeTypeA=0,30*(GetSelectedCount(Date)/7)-DaysSinceProductive/(GetSelectedCount(Date)/7)
//should all be % of what they are ramping up to work
,IF(WorkerCategory= 'CategoryC'and IsEmployeeTypeA=0,sum(Hrs)/(GetSelectedCount(Date)/7)/avg(hrs)
,IF(WorkerCategory= 'CategoryD' and IsEmployeeTypeA=0,sum(Hrs)/(GetSelectedCount(Date)/7)/avg(hrs)
,sum(Hrs)/(GetSelectedCount(Date)/7)/25
))))))
Hi there! Thanks for your response. I was able to figure out the issue. The data behind the calculation was not showing correctly and breaking the formula. I will go ahead and close this post.
Yes, this is exactly what is happening! Thank you for your response! The data behind the calculation needs to be aggregated differently before it will show up properly in the chart.