cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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

View solution in original post

7 REPLIES 7
Super User III
Super User III

Re: Summing last month revenue

Hi @Anonymous

 

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

themistoklis Memorable Member
Memorable Member

Re: Summing last month revenue

@Anonymous

 

You can try the following formula:

Measure = CALCULATE([SUMREVENUE], PREVIOUSMONTH(Calendar[Date]))
Highlighted
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
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

View solution in original post

Community Support
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.

Helpful resources

Announcements
New Ranks Launched March 24th!

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!

‘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

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.

Top Solution Authors
Top Kudoed Authors