0

Group Sum Cost by Week

Fred

Need to sum cost for the group of week on the EV_Management table

I try this formula but don't work  

let Wk := Week;
sum((select EV_Management)[Week = Wk].'ACTUAL_COST-Act')

 

Copy

 

And not  work too

let Wk := Week;
sum((select COST_W)[Week = Wk].'Cost')

 

Copy

6replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
    • Fred
    • Fred
    • 2 mths ago
    • Reported - view

    To troubleshoot, first you need to make sure that it is finding the correct records. So put this in a new formula field:

    concat((select EV_Management)[Week = Wk])
    

    This will return the record Ids of all records that match your filter. Double check this with the actual table.

    Like
      • Rafael
      • Rafael Sanchis
      • Rafael_Sanchis
      • 2 mths ago
      • Reported - view

      Fred 

      The Formulat give me       Error: Field not Found Wk 

      Like
      • Fred
      • Fred
      • 2 mths ago
      • Reported - view

      oops, for got the let statement. my bad.

      Like
    • Rafael
    • Rafael Sanchis
    • Rafael_Sanchis
    • 2 mths ago
    • Reported - view

    let Wk := Week;
    concat((select COST_W)[Week = Wk])

    My ID's in COST_W Begin on 9 and finish on 147

    The Formula result Begin 101 and finish on 147

    😯

    I have 135 Registers 

    Like
    • Fred
    • Fred
    • 2 mths ago
    • Reported - view

    So is that what you expect?

    By copy your DB does not have a field called Week in the COST_W table.

    Like
    • Rafael
    • Rafael Sanchis
    • Rafael_Sanchis
    • 2 mths ago
    • Reported - view

    Fred

    I close the DB and open it and work, sometimes things happend 

    Yes Fred I have a Week field on the COST_W Table 

    Like
Like Follow
  • Status Answered
  • 2 mths agoLast active
  • 6Replies
  • 27Views
  • 2 Following