Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have an Excel file containing five columns: day, month, day types, employees and number of hours worked by an employee.
Example:
Days | Month | Days type | Duration (hours) | Employees
1 | January | weekend | 8 | Gerard
1 | January | weekend | 5 | Kevin
2 | January | normal day | 10 | George
2 | January | normal day | 3 | Kevin
So, on Qlikview, I have 5 tables (fields): Day, month, day type, Duration and Employees.
I would like to create a graph where you can see the sum of hours in weekends per month without selecting the field "weekend" in the table.
This is similar to an "if" in an excel ... but on Qlikview, I can not.
In the script, I try with this code:
if ([type days] = 'weekend', Sum (Duration))
But I have to click on the "weekend" to see the results ... How can I do without clicking?
or I try to count how many weekend there are? with : count([Days type]='weekend') but it'll count each line where there is a weekend. However, there are 1 weekend for the day 1... count([Days type]='weekend') and DISTINCT Days ... don't work too...
Please help me. Sorry for my language, i'm french...
I hope I made myself understood and thank you in advance
The brackets are ok, but the quotes aren't. See attached example. Is that the sort of thing you're looking for?
Hi if u want to show per month
aggr(sum{<day_type ={'Weekend"}>}duration),month)
It doesn't work... there is a problem with brackets?
The brackets are ok, but the quotes aren't. See attached example. Is that the sort of thing you're looking for?
It works , thank you
But I must add Distinct for days because without distinct it counts 2 times the weekend for the day 1.
count({<[Days type]={'weekend'}>} DISTINCT Days)