Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
=sum(SalesAmount)-sum(SalesAmount*(DiscPrcnt/100))-sum(CreditAmount)+sum(CreditAmount*(CNDiscPrcnt/100))
I want to compare prior year actual sales with current year actual sales. I got this formula in the forums:
num(sum({$<Year = {$(=only(Year) - 1)}, Month = {"<=$(=max(Month))"}>} SalesAmount), '#,##0;(#,##0)')
I do not know how to place the actual sales calculation as mentioned on top into this formula. As you will see that this formula only sum(SalesAmount), but I need to add the whole calc as shown on top.
Could someone please assist me. It looks like some simple answer.
Try like this
=num(
sum({$<Year = {$(=only(Year) - 1)}, Month = {"<=$(=max(Month))"}>} SalesAmount)-
sum({$<Year = {$(=only(Year) - 1)}, Month = {"<=$(=max(Month))"}>} SalesAmount*(DiscPrcnt/100))-
sum({$<Year = {$(=only(Year) - 1)}, Month = {"<=$(=max(Month))"}>} CreditAmount)+
sum({$<Year = {$(=only(Year) - 1)}, Month = {"<=$(=max(Month))"}>} CreditAmount*(CNDiscPrcnt/100))
, '#,##0;(#,##0)')
Try like this
=num(
sum({$<Year = {$(=only(Year) - 1)}, Month = {"<=$(=max(Month))"}>} SalesAmount)-
sum({$<Year = {$(=only(Year) - 1)}, Month = {"<=$(=max(Month))"}>} SalesAmount*(DiscPrcnt/100))-
sum({$<Year = {$(=only(Year) - 1)}, Month = {"<=$(=max(Month))"}>} CreditAmount)+
sum({$<Year = {$(=only(Year) - 1)}, Month = {"<=$(=max(Month))"}>} CreditAmount*(CNDiscPrcnt/100))
, '#,##0;(#,##0)')