Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
aresb
Creator
Creator

YTD formula not working

hi everyone,

 

i have this formula

 

sum({<Year={$(=Only(Year))},Month= {"<=$(=max({<Year={$(=Only(Year))}>} [Month num.]))"}>}cod_connid_2_3_4_6_7_v)

which give me this result 

aresb_0-1681725959352.png

 

nevertheless the formula seems working with february data not including january results.

i should have 1540 but give me only february results.

 

Any idea on how to fix this ? 

 

Labels (3)
24 Replies
marcus_sommer

Between 0 and rowno() is a comma missing.

aresb
Creator
Creator
Author

yeah i noticed, but it doesnt work, it give me the results for the current month and not for the cumulative

 

aresb_0-1681741705898.png

 

marcus_sommer

Instead of YearMonth you need to apply the used period-fields - in this case it looked at least like Monthnum.

aresb
Creator
Creator
Author

hi marcus

 

i came up with this formula and it's working 

aggr(RangeSum(Above(TOTAL sum({<YearMonth=,Date=,Year={"=$(=max(Year))"},[Month num.]={"<= $(=max([Month num.]))"}>}cod_connid_2_3_4_6_7_v), 0, RowNo())),Period,Country)

 

the last problem is that doesn't reset for every country 

aresb_0-1681810741600.png

 

any idea on how to resolve this ? 

 

marcus_sommer

The aggr() has a further parameter to sort the aggr-results - maybe an adjustment in this regard may be helpful.