4 Replies Latest reply: Nov 18, 2012 8:28 AM by thelastfleeting RSS

    How can I count without clicking on a table?



      I have an Excel file containing five columns: day, month, day types, employees and number of hours worked by an employee.




      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