Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
bw70316
Helper V
Helper V

Difference between monthly sales, not cumulative total

I would simply like the difference or the month's total sales by month, and not a cummulative figure. For example, I am currently getting the following output:

Revenues ReceivedMONTH
$9,061,289.6611
$8,924,656.0710
$7,099,541.629
$5,301,671.968
$3,804,197.987


What I would Like is:


Revenues ReceivedMONTH
$136,63311
$1,825,114.4510
$1,797,8709
$1,497,4748
$3,804,1977


The ACTUAL Sales AMOUNT by Month and not a cummlative total. 

1 ACCEPTED SOLUTION

I had trouble getting this to work. I think its because the months I had were formed through a number of revenue/expense items. I did indeed get the correct totals in the column, but b/c the consists of numerous expense items, the numbers cumulate.

trial.png
I was able to get what I desired with this equation:

TotalRev2 =
VAR CumRev =
CALCULATE([Sum Rev Rec.], FILTER(ALL(Revenues), Revenues[MonthNUM]=MAX(Revenues[MonthNUM])-1))
VAR CurRev= [Sum Rev Rec.]

RETURN


(CurRev-CumRev)


Thanks for your reply and assistance.

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @bw70316

Create columns

Column = CALCULATE(SUM(Sheet4[Revenues Received]),FILTER(ALL(Sheet4),[MONTH]=EARLIER(Sheet4[MONTH])-1))

Column 2 = [Revenues Received]-[Column]

15.png

 

 

You could change the decimal palces.

In your example, $1,825,114.45 should set 2, others should set 0, but one column only support set one kind value, so i set 2 for all.

 

Best Regards

Maggie

 

I had trouble getting this to work. I think its because the months I had were formed through a number of revenue/expense items. I did indeed get the correct totals in the column, but b/c the consists of numerous expense items, the numbers cumulate.

trial.png
I was able to get what I desired with this equation:

TotalRev2 =
VAR CumRev =
CALCULATE([Sum Rev Rec.], FILTER(ALL(Revenues), Revenues[MonthNUM]=MAX(Revenues[MonthNUM])-1))
VAR CurRev= [Sum Rev Rec.]

RETURN


(CurRev-CumRev)


Thanks for your reply and assistance.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.