0

Need help !

I need Calculate  the Period Cost and Period Hours how can I do this o what I need to do.

I send a sample table.

Example: Cost 24/5/2024 41.258,95 $                          Period Cost  = 4302.95 $

                 Cost 17/52024 36.956.00    $    

8 Antworten

null
    • Rafael_Sanchis
    • vor 5 Monaten
    • Gemeldet - anzeigen

    If anyone can help me with some ideas

    • Rafael_Sanchis
    • vor 5 Monaten
    • Gemeldet - anzeigen

    If it is possible to calculate the cummulative, there should be some way to calculate the period

    • T_Bartzsch
    • vor 5 Monaten
    • Gemeldet - anzeigen

    What do you need exactly? 

      • Rafael_Sanchis
      • vor 5 Monaten
      • Gemeldet - anzeigen

       

      Hi. 

      I need calculate the differest between dates for fthe Actual Cost Week.

      Example

      24 May 2024 period is 41.258,95 - 36.956,00 = 4.302.95 the spent cost between 17/May and 24/May

      Need it for every week

    • mirko3
    • vor 5 Monaten
    • Gemeldet - anzeigen

    Hi Rafael. take two new columns and write the script in each one. Mirko

    let t := this;
    let pos := index(((select 'Actual Cost') order by Week).number(Nr), t.number(Nr));
    let ary := ((select 'Actual Cost') order by Week)[Week <= t.Week].'Actual Cost Week';
    if pos = 0 then
        item(ary, pos)
    else
        item(ary, pos) - item(ary, pos - 1)
    end
    
    let t := this;
    let pos := index(((select 'Actual Cost') order by Week).number(Nr), t.number(Nr));
    let ary := ((select 'Actual Cost') order by Week)[Week <= t.Week].'Actual Hours to Week';
    if pos = 0 then
        item(ary, pos)
    else
        item(ary, pos) - item(ary, pos - 1)
    end
    
      • Rafael_Sanchis
      • vor 5 Monaten
      • Gemeldet - anzeigen

       

      Appreciatte your help again.👍

      • Rafael_Sanchis
      • vor 5 Monaten
      • Gemeldet - anzeigen

       I really appreciate your time, it works very well as I need it.

      • mirko3
      • vor 5 Monaten
      • Gemeldet - anzeigen

       Thank you. A little tip. If your table is also used across years, then you should switch all functions to yearweek(), otherwise the script will be buggy. week() is not unique. But you know that yourself. Mirko

Content aside

  • Status Answered
  • vor 5 MonatenZuletzt aktiv
  • 8Antworten
  • 38Ansichten
  • 3 Folge bereits