Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm trying to create an expression, which calculates the YTD accumulation, but for sub products of the first one per Month-Year.
It works fine if I have just 1 product, per Month Year. ie. The accumulation works as expected and the calc for this is:
=rangesum(above(Total sum({<[Sales Date]={">=$(vStartCurrYr)<=$(vCurrYrEndDate)"},[Sales Date1]= {">=$(vYTDYEAR) <=$(vYTDDate)"}, PeriodFY_Month_Name>} Measure)
,0,rowno(TOTAL)) )
But when I add in a Sub Product, next to Product, it doesn't accumulate per Sub Product. It appears that it is accumulating all the values for the Sub Products together, like the following:
In this case, there are 2 Sub Product per Product, but it doesn't accumulate correctly per Sub Product.
Any ideas on how to accumulate the values per Sub Product per Month Year?
Much appreciated.
May be try this
=Aggr(RangeSum(Above(Sum({<[Sales Date] = {">=$(vStartCurrYr)<=$(vCurrYrEndDate)"}, [Sales Date1] = {">=$(vYTDYEAR) <=$(vYTDDate)"}, PeriodFY_Month_Name>} Measure) , 0, RowNo())), Product, Sub-Product, ([Month Year], (NUMERIC)))