cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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 Received MONTH \$9,061,289.66 11 \$8,924,656.07 10 \$7,099,541.62 9 \$5,301,671.96 8 \$3,804,197.98 7

What I would Like is:

 Revenues Received MONTH \$136,633 11 \$1,825,114.45 10 \$1,797,870 9 \$1,497,474 8 \$3,804,197 7

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

1 ACCEPTED SOLUTION
Helper V

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.

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)

2 REPLIES 2
Community Support

Hi @bw70316

Create columns

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

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

Helper V

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.

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)

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - June 2024

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

#### Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors