0

Cumulative Sum

Hi need a script to cumulative Hours by Discipline.

Discipline is N:1 relationship

4 Antworten

null
    • Gotje_Ing
    • vor 3 Monaten
    • Gemeldet - anzeigen

    IF (and that is a necessity here) the cumulative sum is following the Id of the records, or you have any other ordering system in a field, you could do something like this:

    let my := this;
    sum(select(Table where Discipline = my.Discipline and Id < my.Id).Hours)

     

      • Rafael_Sanchis
      • vor 3 Monaten
      • Gemeldet - anzeigen

       

      yoi Götje, I send a dummy DB, in the table 'Hours by Resources' in the Column 'Cumulative' I have the formula I modify something Don't work, I'm doing somithing bad.

      let my := this;
      sum(select 'Hours by Resources' where 'Disciplines_>' = my.'Disciplines_>'.Discipline and Id < my.Id).'Total Hours Categ'
      

      'Disciplines_>' is a N:1 inside are the Discipline

      • Gotje_Ing
      • vor 3 Monaten
      • Gemeldet - anzeigen

       
      The correct code looks like this:

      let my := this;
      sum((select 'Hours by Resources' where 'Disciplines_>' = my.'Disciplines_>' and Id <= my.Id).'Total Hours Categ')
      
    • Rafael_Sanchis
    • vor 3 Monaten
    • Gemeldet - anzeigen

    Excelent appreciate your help.

Content aside

  • Status Answered
  • vor 3 MonatenZuletzt aktiv
  • 4Antworten
  • 46Ansichten
  • 2 Folge bereits