Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to calculate expression.It's shows like quotient:
onefield/secondfield
I need to calculate it in YearToDate type.
Dividend increase separately than divider.But i need to get a sum of mounthly quotient in yeartodate type.How can i get it?
i try to use this formula:
Sum({<Date={'$(<=vMaxDate)'}>}Aggr($(vQuotient),[Nomenclatura]))
Nomenclatura | Quotient |
---|---|
type1 | 350 |
Haha, it was a little error, the sum was lacking the MonthYear=. Just add it to the first expression, like this:
Sum( {<Date={"<=$(vMaxDate)"}, Month=,MonthYear=>}
Aggr(
Sum( {<Date={"<=$(vMaxDate)"}, Month=,MonthYear=>} OneField)
/
Sum( {<Date={"<=$(vMaxDate)"}, Month=,MonthYear=>} SecondField)
,MonthYear)
)
I think this will do what you want, just make sure to select only one Year, so that dates from previous years are not taken into account:
Sum({<Date={"<=$(vMaxDate)"}>} OneField)
/
Sum({<Date={"<=$(vMaxDate)"}>} SecondField)
My english so bad((
I mean that count separatly exactly a problem.Let me explain on example%
I have in January this situation
OneField=15
SecondField=5
January quotient will be 3
On February another situation
OneField=20
SecondField=10
February quotient will be 2
If we will take YearToDate separatly,we will have
OneField 35
SecondField=15
and YearToDate quotient will be 2,3
but in my case it must be 5,that is quotient on January + quotient on February
Ok, then I think should work, just create a Field called MonthYear with the MonthName function based on the Date field.
Sum( {<Date={"<=$(vMaxDate)"}>}
Aggr(
Sum( {<Date={"<=$(vMaxDate)"}>} OneField)
/
Sum( {<Date={"<=$(vMaxDate)"}>} SecondField)
,MonthYear)
)
Let me know your results.
it doesn't work,result only for selected month((
Disregard the month selections. Try:
Sum( {<Date={"<=$(vMaxDate)"}, Month=>}
Aggr(
Sum( {<Date={"<=$(vMaxDate)"}, Month=>} OneField)
/
Sum( {<Date={"<=$(vMaxDate)"}, Month=>} SecondField)
,MonthYear)
)
if place "Month=" in dividend and divider it will show total sum.
not work for me
(try with month= in all case,only in aggr case and only in quotient case) that not working....
Review the attached... I think that's what you want, isn't it?
that meaning,but not that vision...i need this in YTD form....
maybe becouse of this it isn't working
example
without YTD quotient looks like
January 5
Febrary 3
March 4
April 6
But i try this
January 5
Febrary 8
March 12
April 18
And this in one field,thats changes depend on your selection
P.S. thx for helping)
Ooooooh! so you want the accumulated value. Review the attached.