cancel
Showing results for
Did you mean:
Anonymous
Not applicable

## Summing last month revenue

Hello guys, I've got a measure that sums the revenue of the current month, but I can't sum the last month's revenue, I tried this. LastMonth = CALCULATE([SUMREVENUE];LASTDATE('Calendar'[Date]) -1) but it doesn't work, how can i sum the last month's revenue based on this measure ?
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Anonymous
Not applicable

## Re: Summing last month revenue

I did that, thanks guys! As a got some blank registers I managed to use nonblank function so I worked like LastMONTH = CALCULATE([SUMREVENUE];PREVIOUSMONTH(LASTNONBLANK('Calendar'[Date];[SUMREVENUE]))) It worked xD
7 REPLIES 7
Super User III

## Re: Summing last month revenue

Hi @Anonymous

What is the code for [SUMREVENUE]? Where/how do you intend to use [LastMonth]?

Memorable Member

## Re: Summing last month revenue

@Anonymous

You can try the following formula:

`Measure = CALCULATE([SUMREVENUE], PREVIOUSMONTH(Calendar[Date]))`
Anonymous
Not applicable

## Re: Summing last month revenue

SUMREVENUE = SUM(Revenue[Revenue Value]) I intend to use it doing like CURRENTMONTH - LASTMONTH so I can see the variation, you know?
Anonymous
Not applicable

## Re: Summing last month revenue

I tried this but it returned blank, I forgot to mention that the my date table goes until january of 2019 which has no revenue value, the last value registered is on 11 december
Highlighted
Anonymous
Not applicable

## Re: Summing last month revenue

I did that, thanks guys! As a got some blank registers I managed to use nonblank function so I worked like LastMONTH = CALCULATE([SUMREVENUE];PREVIOUSMONTH(LASTNONBLANK('Calendar'[Date];[SUMREVENUE]))) It worked xD
Community Support

## Re: Summing last month revenue

@Anonymous,

By the way, you may help accept solution. Your contribution is highly appreciated.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

## Re: Summing last month revenue

I can't select solution I don't know why but it return this error: Authentication failed for the action you are trying to do. This failure could be due to your browser not supporting JavaScript, JavaScript not being enabled, or trying to use the action URL directly in the browser address bar instead of clicking the link on the page.

Announcements

#### New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

#### ‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

#### Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

#### Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

#### Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors