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
aidaamieira
New Member

cumulative calculation

 

Hi,
I need help with the following:
I have a database with quarterly results, my objective is to present the quarterly and accumulated results, that is, whoever consults the dashboard could consult the results of one of these options:
1Q 2021;
1Q Accumulated 2021 (1Q 2021);
2Q 2021;
Accumulated 2Q 2021 (1Q 2021 + 2Q 2021)
3Q 2021;
Accumulated 3Q 2021 (1Q 2021 + 2Q 2021 + 3Q 2021)
4Q 2021;
4Q Accumulated 2021 (1Q 2021 + 2Q 2021 + 3Q 2021 + 4Q 2021)
1Q 2022;
Accumulated 1Q 2022 (2Q 2021 + 3Q 2021 + 4Q 2021 + 1Q2022);
2Q 2022;
Accumulated 2Q 2022 (3Q 2021 + 4Q 2021 + 1Q2022 + 2Q2022);
3Q 2022;
Accumulated 3Q 2022 (4Q 2021 + 1Q2022 + 2Q2022 + 3Q2022);
4Q 2022;
4Q Accumulated 2022 (1Q2022 + 2Q2022 + 3Q2022 + 4Q2022);
The problem centered on the fact that a quarter is included in the calculation of the average value of more than one accumulated, for example, the 1st of 2021, it is included in the accumulated of the 1Q of 2021, the 2Q of 2021, the 3Q of 2021 and the 4Q 2021.
The database is updated quarterly.
The only solution I have at the moment is every time a quarter is entered, adding a new metric for the cumulative calculation, or updating the existing metric. However, I would like to put this calculation automatically or in a single metric.

To make it easier, here is an explanation with images.
The database I have is something like this:

Imagem1_1.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

And what I want to get is something like this:

Imagem2_2.png

The idea is to have the 4 filters (year, quarter, sector and company) with a single selection option for all except the company and add an option to the quarter filter that, when selected, gives the results for the accumulated year as I explained previously.
Is there any possibility?
Thanks in advance.

1 ACCEPTED SOLUTION
sergej_og
Super User
Super User

Hey @aidaamieira,
what about TOTALYTD formula?
Smtg like this Acc = TOTALYTD(your measure, Calendar[Date])

Have you already played around with it?

Regards

View solution in original post

2 REPLIES 2
sergej_og
Super User
Super User

Hey @aidaamieira,
what about TOTALYTD formula?
Smtg like this Acc = TOTALYTD(your measure, Calendar[Date])

Have you already played around with it?

Regards

Thank you @sergej_og 

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.