Skip to main content
cancel
Showing results for 
Search instead 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.

Reply
ErickReiis
Helper I
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:

ErickReiis_0-1690647843826.png

 

 

 

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

ErickReiis_1-1690647843741.png

 

 

 

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
v-xinruzhu-msft
Community Support
Community Support

Hi @ErickReiis 

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

vxinruzhumsft_0-1690767601914.png

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.

 

View solution in original post

1 REPLY 1
v-xinruzhu-msft
Community Support
Community Support

Hi @ErickReiis 

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

vxinruzhumsft_0-1690767601914.png

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.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

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

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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