cancel
Showing results for
Did you mean:

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Helper I

## Accumulated over the years but keeping the filters that can be applied

Hello everyone, everything good?

I have a table where I need to perform a sum of information from the previous year with the current year to generate a kind of accumulated to perform a rate calculation.

The table I have is the one in the following example:

And the calculation I need to perform would be something that would generate a table as a result in the following sense:

Add the information for 2017 + 2018 to the 2018 result,

for 2019, it would be the sum of 2017 + 2018 + 2019

And so on.

But the most important thing is to keep all the possibilities of filters that my table makes available (I need to perform the calculation without the ALL function or making the filters remain).

Could you help me with the formula?

1 ACCEPTED SOLUTION
Community Support

You can refer to the following measure, it will keep the filter.

``Measure = CALCULATE(SUM('Table'[N_De]),FILTER(ALLSELECTED('Table'),'Table'[Moda] in VALUES('Table'[Moda])&&'Table'[Ano]<=SELECTEDVALUE('Table'[Ano])))``

Output

Best Regards!

Yolo Zhu

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

Community Support

You can refer to the following measure, it will keep the filter.

``Measure = CALCULATE(SUM('Table'[N_De]),FILTER(ALLSELECTED('Table'),'Table'[Moda] in VALUES('Table'[Moda])&&'Table'[Ano]<=SELECTEDVALUE('Table'[Ano])))``

Output

Best Regards!

Yolo Zhu

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

Announcements

#### Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

#### Power BI Monthly Update - April 2024

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

#### Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors