Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have following table and want to have a ratio between current month and last month, how about the expression ?
Year | Month | Sales |
---|---|---|
2014 | 1 | 100 |
2014 | 2 | 220 |
2014 | 3 | 300 |
2014 | 4 | 120 |
2014 | 5 | 400 |
Is my below expression correct ?
Sum(sales)-sum({<Month=(Month-1)>} sales)
Expecting view is like below.
Thanks&Regards,
Jessica
Try this may be:
=Sum(Sales)/If(Sum(Sales) > 0, Above(Sum({<Month = >}Sales)))
Hi Sunny,
It does not work
Thank you
Jessica
Isn't this the output you are expecting to see from your given sample above??
Expression: =Sum(Sales)/If(Sum(Sales) > 0, Above(Sum({<Month = >}Sales)))-1
Try This..
=((SUM(SALES) - Above(SALES))/Above(SALES)) * 100
Hi,
Try like this
=If(RowNo() = 1, 1, (Sum(Sales) - Alt(Above(Sum(Sales)), 0) )/ Alt(Above(Sum(Sales)), 0)
Hope this helps you.
Regards,
Jagan.
hi, this express is correct, thank you!
Regards,
Jessica
Awesome
I am glad I was able to help.
Best,
Sunny
Hi Try this modified Jagan's Expression.
=If(RowNo() = 1, 1, (Sum(Sales) - Alt(Above(Sum(Sales)), 0) )/ Alt(Above(Sum(Sales)), 0))