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
Super User

Re: Summing last month revenue

Hi @Anonymous

 

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

themistoklis New Contributor
New Contributor

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

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
Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 146 members 1,570 guests
Please welcome our newest community members: