Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a calculated field Note, where my user choses three dates
then I want to calculate sum(Note) of the last 10 previous dates of the chosen date by my user.
for example if my user choses 29/072019 , I have to Sum the values of the following dates
Thank you,
Best regards.
@SRSB May be this for your set analysis
StartDATE = {">=$(=Date(Max({<StartDATE = {[<$(=Date(Max(StartDATE), 'DD-MM-YYYY'))]}>} StartDATE, 10), 'DD-MM-YYYY'))<=$(=Date(Max(StartDATE), 'DD-MM-YYYY'))"}
@SRSB May be this for your set analysis
StartDATE = {">=$(=Date(Max({<StartDATE = {[<$(=Date(Max(StartDATE), 'DD-MM-YYYY'))]}>} StartDATE, 10), 'DD-MM-YYYY'))<=$(=Date(Max(StartDATE), 'DD-MM-YYYY'))"}
Thank you for your help.
In fact I have to get the 10 previous dates of a date chosen from an alternate state, then calculate the number of notes that are out of a precalculated range.
COUNT(distinct{<
Descripteur=P({State1}Descripteur),
AgeProd= P({State1}AgeProd),
//StartDATE={">=$(vLast10)<=$(vEndDate_State1)"},
StartDATE = {">=$(=Date(Max({<StartDATE = {[<$(=Date(Max(StartDATE), 'DD-MM-YYYY'))]}>} StartDATE, 10), 'DD-MM-YYYY'))<=$(=Date(Max(StartDATE), 'DD-MM-YYYY'))"},
note={"<$(v_Moins)>$(v_Plus)"}
>} note)
my StartDate should be in [last 10 date before the chosenEndDate(state1),chosenEndDate(state1)]
Is this possible ?
@SRSB That is what it should be doing, is it not?
In fact, I just have a problem with my variable, otherwise your solution works perfectly ! Thanks 😊