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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.