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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
alsolok
Helper II
Helper II

Cumulative realise N-1 depending realise N

Hello everyone,
I have a financial fact table which contains the columns accounting_date, CC, realized_amount.
I calculated the amount realized by doing sum(finance[amount_realise]) and an amount realized N-1 by doing CALCULATE(SUM(finance[amount_realise]),SAMEPERIODLASTYEAR('Dim Date'[Date]))
I can decline the amount realized and the amount realized n-1 per year, month and CC.
I remind you, we have a date dimension which is linked to the finance fact table through the accounting_date and date column of the date dimension.
An example: when I put the amount realized by CC in a table, the amount realized is indicated up to a given month and the amount realized N-1 over the whole year (which I find normal) Now I would like to calculate an cumulative amount N-1 depending on the amount realized, that is to say if for example for the year 2024 we have the amount realized in the finance table which is entered until June, I would also like to have a measurement amount realized N- 1 which will be the cumulative amount of the previous year until the month where we have the realized amount entered or when we select the month filter example April that realized amount N-1 is accumulated until the selected month.

Thank you all for your responses

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @alsolok ,

 

Check if this blog post and video can help you:

 

https://www.sqlbi.com/articles/previous-year-up-to-a-certain-date/


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





View solution in original post

3 REPLIES 3
MFelix
Super User
Super User

Hi @alsolok ,

 

Check if this blog post and video can help you:

 

https://www.sqlbi.com/articles/previous-year-up-to-a-certain-date/


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Thank you

bhanu_gautam
Super User
Super User

@alsolok , For this requirement make sure you have one date table , then create measures 

 

AmountRealized = SUM(finance[realized_amount])

 

AmountRealizedN1 =
CALCULATE(
SUM(finance[realized_amount]),
SAMEPERIODLASTYEAR('Dim Date'[Date])
)

 

CumulativeAmountRealizedN1 =
VAR CurrentYear = MAX('Dim Date'[Year])
VAR CurrentMonth = MAX('Dim Date'[Month])
RETURN
CALCULATE(
[AmountRealizedN1],
FILTER(
ALL('Dim Date'),
'Dim Date'[Year] = CurrentYear - 1 &&
'Dim Date'[Month] <= CurrentMonth
)
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.