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.

Life to Date calculations

Hi,

I have a data in below format and i want to take Life to date data in next to Sales column. Example 2017 row should reflect 100+200+300= 600. Can someone help me on this.

 

YearSales
2015100
2016200
2017300
2018400
2019500
2020600
2021700
2022800
2023900
Status: New
Comments
v-lili6-msft
Community Support

hi

just create a simple measure like below:

Measure = CALCULATE(SUM('Table'[Sales]),FILTER(ALL('Table'[Year]),'Table'[Year]<=MAX('Table'[Year])))

Result:

31.JPG

 

by the way, for this problem, you could have a look these blog:

https://www.sqlbi.com/articles/computing-running-totals-in-dax/

https://www.wallstreetmojo.com/power-bi-running-total/

https://www.goodly.co.in/running-total-power-bi/

 

 

Regards,

Lin