The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
Could you help me with the formula?
Solved! Go to Solution.
Hi, @ErickReiis
You can try the following methods.
Measure = CALCULATE ( SUM ( 'Table'[Value] ),
FILTER ( ALL ( 'Table' ),
[Type] = SELECTEDVALUE ( 'Table'[Type] )
&& [Year] <= SELECTEDVALUE ( 'Table'[Year] )
)
)
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @ErickReiis
You can try the following methods.
Measure = CALCULATE ( SUM ( 'Table'[Value] ),
FILTER ( ALL ( 'Table' ),
[Type] = SELECTEDVALUE ( 'Table'[Type] )
&& [Year] <= SELECTEDVALUE ( 'Table'[Year] )
)
)
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Please check this below tutorial..