9 Replies Latest reply: Aug 5, 2011 2:19 PM by Rob Wunderlich RSS

    Use loaded data for calculations

      hi, i'm new to qlikview and fighting with a little problem.

       

      i'm loading data and transforming it with a formular and name it as value1, value2

       

      afterwards i what to calculate a value 3 which is the difference between the two values.

       

      value1

      makedate(year(left(datecomplete,10)),month(left(datacomplete,10)),day(left(datecomplete,10))) AS VALUE1

      value2

      the same als value 1, just from a different field

       

      if i'm using now the formulare

      networkdays(value1,value2),

      the script they no value 1

       

      any ideas?

       

      thanks for your help.

       

      florian

        • Use loaded data for calculations
          Kaushik Solanki

          Hi,

           

             Qlikview returns the correct answer.

           

             Let me explain.

           

             As you said you have Value1 and Value2 same as Value1.

           

             So consider that your Value1 is 2011-01-01 so your value2 will be the same i.e 2011-01-01.

           

             Now when you use Networkdays(Value1,Value2). If we put values in this expression, it becomes.

           

             Networkdays(2011-01-01,2011-01-01)

           

             So the result of the above expression is 1. As there is only one day in this.

           

             Syntax of Networkdays()  is

            

             networkdays ( start:date, end_date {, holiday} )

           

             Hope you understood.

           

          Regards,

          Kaushik Solanki