cancel
Showing results for
Did you mean:
Highlighted
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
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]?

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

Announcements

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!