Forum Discussion
Eriko
11 years agoFrequent Visitor
Calculate the month-over-month
Hello. There are a table "Sales" and a table "Date". I want to do is the following. 1. Outputs Sales Amount of every month. 2. Calculate the month-over-month. I referenced this site,...
- 11 years ago
Just tried something like this which gives me the previous month
Previous month = CALCULATE(SUM('GA Ecommerce'[Sales]),PREVIOUSMONTH('GA Ecommerce'[Date]))
or
Previous Month = CALCULATE(SUM('GA Ecommerce'[Sales]),DATEADD('GA Ecommerce'[Date],-1,MONTH))
Should be pretty easy to do MOM from this.
neetishrai
10 years agoNew Member
did anybody get the solution for this
i am using PrevMonthRev = CALCULATE(sum(salesdata[revenue]),PREVIOUSMONTH('date'[Month])) but it is not giving any data
neetishrai
10 years agoNew Member
date table
| DateKey | Year | Month |
| 1 | 2015 | 1-Jan |
| 2 | 2015 | 1-Feb |
| 3 | 2015 | 1-Mar |
| 4 | 2015 | 1-Apr |
| 5 | 2015 | 1-May |
| 6 | 2015 | 1-Jun |
| 7 | 2015 | 1-Jul |
| 8 | 2015 | 1-Aug |
| 9 | 2015 | 1-Sep |
| 10 | 2015 | 1-Oct |
| 11 | 2015 | 1-Nov |
| 12 | 2015 | 1-Dec |
| 13 | 2016 | 1-Jan |
| 14 | 2016 | 1-Feb |
| 15 | 2016 | 1-Mar |
| 16 | 2016 | 1-Apr |
| 17 | 2016 | 1-May |
| 18 | 2016 | 1-Jun |
| 19 | 2016 | 1-Jul |
| 20 | 2016 | 1-Aug |
- neetishrai10 years agoNew Member
sales table
DateKey revenue 1 123 2 234 3 345 4 456 5 567 6 678 7 789 8 8910 9 91011 10 101112 11 111213 12 121314 13 231 14 248 15 391 16 487 17 598 18 694 19 799 20 8980 - neetishrai10 years agoNew Member
it worked for me