3 Replies Latest reply: Apr 8, 2012 4:30 AM by Göran Hofstedt RSS

    How to do calculation in qv?

    Göran Hofstedt

      Hi

      I´m not sure how to do this but hope some can help me.

       

      I have the following fields with data: Timeunit that are either "day", "week" or "month". Time that are a number. Periodicity that are a number. 

      Then I have seven diffrent fields that have "J" in them if true. (if time are set to occur on monday, monday=J, and so on for the diffrent days)

       

      I want to do the following (in script if it´s poosible)

       

      If timeunit are week, Time / Periodicity

      If timeunit are month, (Time / Periodicity) /4,33

      If timeunit are day, (number of J * Time) / Periodicity     

       

      (As for number of J, max 7 - how to make qlikview "count" number of J, and if their ain´t any markes of J, will qv count 0? If so, I have to make it count 1 because 0 ' xy will return 0 and thats wrong?)

       

       

      I attach I small sample of data in xls.