Forum Discussion
CURRENTMONTH() ?
Curious, there is PREVIOUSMONTH() and NEXTMONTH(), how come there isn't CURRENTMONTH()?
Figured it out:
Revenue MTD = CALCULATE(SUM('GA Ecommerce'[Revenue]),PARALLELPERIOD('GA Ecommerce'[Date],0,MONTH))
8 Replies
- leonardmurphySkilled Sharer
There's a DATESMTD() - is that what you're looking for?
- ALeefResolver II
Its:
MONTH(TODAY())
- procyon82Resolver I
MONTH(TODAY()) would give me this month, what about every month?
- procyon82Resolver I
I'm trying to calculate the monthly average order size in dollars. My data is listed in daily format. When I create a chart I can add my data and select average and it will display the average daily data nicely. The problem is once you are looking for a weekly or monthly average you end up getting an average of all the daily averages which is close but incorrect.
Revenue MTD = CALCULATE(SUM('GA Ecommerce'[Revenue]),DATEADD('GA Ecommerce'[Date],0,MONTH)) gives me daily revenue
Revenue MTD = CALCULATE(SUM('GA Ecommerce'[Revenue]),MONTH('GA Ecommerce'[Date])) gives me the all time totalRevenue MTD = CALCULATE(SUM('GA Ecommerce'[Revenue]),DATESMTD('GA Ecommerce'[Date])) gives me daily MTD
Previous Month = CALCULATE(SUM('GA Ecommerce'[Revenue]),PREVIOUSMONTH('GA Ecommerce'[Date])) and
Next Month = CALCULATE(SUM('GA Ecommerce'[Revenue]),NEXTMONTH('GA Ecommerce'[Date])) give me exactly what I want but for the wrong month.