0

Need a formula between week to place on (%Semana Plan)

Need a formula to calculate, the % Semana Plan, the the difference between the current week and the previous one.

4 replies

null
    • Fred
    • 5 days ago
    • Reported - view

    maybe something like:

    let t := this;
    let prevRec := (select TalbeName where Week = (t.Week-1));
    'Progress Plan' - prevRec.'Progress Plan'
    
      • Rafael Sanchis
      • Rafael_Sanchis
      • 4 days ago
      • Reported - view

       

      Hi Fred give me Error

      Invalid operator: string - number at line 2, column 62

      The progress plan% is  numeric fiel, an Week is text field

      • John_Halls
      • 4 days ago
      • Reported - view

       You can turn text into a number with the number() function, so in your case number(Week) and number(t.Week)

      Regards John

      • Rafael Sanchis
      • Rafael_Sanchis
      • 4 days ago
      • Reported - view

       

      Hi John. Thanks.

      Find the solution. (Don't know is the best solution but work)

      let currentWeek := number(this.Week);
      let prevWeek := currentWeek - 1;
      let prevRec := first(select 'WS-Report EVM' where number(Week) = prevWeek);
      if prevRec then
          number(this.'Progress Plan') - number(prevRec.'Progress Plan')
      else
          null
      end

Content aside

  • Status Answered
  • 4 days agoLast active
  • 4Replies
  • 21Views
  • 3 Following