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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
PowerRanger1
New Member

Cummulative Sum Calculated Column

Hi, 

 

I'm looking to sum cummulative sales month on month per fiscal year(FY) my data is as per the below & the result i'm looking for is a calculated column called "FY Cummulative" as shown.

 

Month Name (text)FYRevenueFY Cummulative
Apr23120000120000
May23100000220000
Jun23200000420000
Jul23300000720000
Aug23100000820000
Sep232000001020000
Oct231000001120000
Nov231000001220000
Dec232000001420000
Jan231000001320000
Feb232000001520000
Mar231000001620000
Apr24100000100000
May24200000300000
Jun24400000700000
Jul24100000800000

 

Can you please advise how i can achieve this with DAX so that its adds up the revenue cummulative each month and then resets the sum once the number in the FY column changes to a new financial year. 

 

Thanks in advance.

 

1 ACCEPTED SOLUTION
v-kaiyue-msft
Community Support
Community Support

Hi @PowerRanger1 ,

Thanks @tamerj1  for your replies, allow me to provide another insight:
1. create new index column in power query editor.

vkaiyuemsft_0-1713765097642.png


2. create calculated column and write expression.

Column =
CALCULATE(
SUM('Table'[Revenue]),
FILTER(
ALL('Table'),
'Table'[FY] = EARLIER('Table'[FY]) &&
'Table'[Index] <= EARLIER('Table'[Index])
)
)

vkaiyuemsft_1-1713765123497.png

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-kaiyue-msft
Community Support
Community Support

Hi @PowerRanger1 ,

Thanks @tamerj1  for your replies, allow me to provide another insight:
1. create new index column in power query editor.

vkaiyuemsft_0-1713765097642.png


2. create calculated column and write expression.

Column =
CALCULATE(
SUM('Table'[Revenue]),
FILTER(
ALL('Table'),
'Table'[FY] = EARLIER('Table'[FY]) &&
'Table'[Index] <= EARLIER('Table'[Index])
)
)

vkaiyuemsft_1-1713765123497.png

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thats great, working as expected. Thanks Clara

tamerj1
Super User
Super User

Hi @PowerRanger1 

Please try

FY Cummulative =
IF (
HASONEVALUE ( 'Date'[FY] ),
SUMX (
FILTER (
CALCULATETABLE (
SUMMARIZE ( 'Date', 'Date'[FY], 'Date'[Month Name] ),
ALLSELECTED ()
),
'Date'[FY] = MAX ( 'Date'[FY] )
),
[Revenue]
)
)

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors