Forum Discussion
dvhez
7 years agoHelper II
Running total values by year
I have various power plants with total capacity and date they got into operation. My objective is to have the total capacity YTD of all power plants. I tried the following DAX code but the custom column I created is just a copy of Table1[Values]. What I'm missing?
YTD =
CALCULATE (
SUM (Table1[Values]);
FILTER(ALLSELECTED(
Table1;
Table1[Years] <= MAX(Table1[Years])
)
)
2 Replies
- AnonymousNot applicable
dvhez,
Create a measure instead of a column to calculate YTD, you can check more details in attached PBIX file. If you don't get expected result, please share sample data of your table here and post desired result.
Regards,
Lydia