Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum of Costs in current week in Textbox

Hello everyone

I would like to show the sum of my Field "costs" in a textbox. But only of the current week. What is the expression for this?

Thank you very much in advance...

1 Solution

Accepted Solutions
giakoum
Partner - Master II
Partner - Master II

true so add year in the set expression as well

=Sum({<Week={"$(=week(today()))"}, Year={"$(=Year(today()))"}>} costs)

View solution in original post

12 Replies
giakoum
Partner - Master II
Partner - Master II

=Sum({<Week={"$(ThisWeekVariable)"} >} costs)

Assuming that you have a variable holding this week

or you may replace the variable with an expression for this week :

=Sum({<Week={"$(=week(today()))"} >} costs)

Not applicable
Author

Hi,

Try something like this

=sum( {$<Week = Week(today()) >} Costs )

Not applicable
Author

Ευχαριστώ


But then I get all values from week 40, also in the years before, right?


Best


Jan

giakoum
Partner - Master II
Partner - Master II

true so add year in the set expression as well

=Sum({<Week={"$(=week(today()))"}, Year={"$(=Year(today()))"}>} costs)

Not applicable
Author

Okay, the value in the textbox is still the total sum of all values. The whole expression is underlined with a red line. something does not fit with the expression yet...

ashfaq_haseeb
Champion III
Champion III

Try like this

=Sum({<Week={"$(=week(today()))"},Year={"$(=Year(today()))"} >} costs)

Replace fields with your actual fields

Regards

ASHFAQ

Not applicable
Author

AWESOME! Thank you very much!

er_mohit
Master II
Master II

Try this

Sum({$<DATE={"<=$(=Date(Max(DATEWeek)-7,'DD-MM-YYYY'))"}>}costs)

Make sure Date format is same as used for Date field.

ashfaq_haseeb
Champion III
Champion III

Hi,

Can you close this thread by selecting appropriate answers.

Regards

ASHFAQ