Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey Everyone
I would really appreciate your help on this one.
What would be an equivalent statement in qlik for the below statement?
for resource type in month:
if resource type = Permanent or resource type = Contractor:
avail_hours = avail_hours/ (8*5*4)
else:
avail_hours = avail_hours/ (7*5*4)
So I want to differentiate how I calculate the avail_hours for these different groups
I've tried using the if statement on the script editor but I don't think it works or it doesn't calculate for each month
Is there a better way of doing it?
Hi, it depends on your data structure (data sample you are using now would be really helpful here, current load script too), but expression could be this:
if(match([resource type], 'Permanent', 'Contractor'), avail_hours / (8*5*4), avail_hours/ (7*5*4))
but to aggregate it by month, as I believe you are trying to achieve, you need write additional "group by [month].." at the end of your data load script.
Hi, it depends on your data structure (data sample you are using now would be really helpful here, current load script too), but expression could be this:
if(match([resource type], 'Permanent', 'Contractor'), avail_hours / (8*5*4), avail_hours/ (7*5*4))
but to aggregate it by month, as I believe you are trying to achieve, you need write additional "group by [month].." at the end of your data load script.
Thank you.
I will try this solution