Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I want to calculate Total Count of each year in DAX when i have multiple years in my dataset as shown below,
| Year | Month | Count of WO | Total Count of each year |
| 2018 | March | 467 | 628 |
| 2018 | April | 20 | 628 |
| 2018 | May | 141 | 628 |
| 2019 | January | 161 | 10731 |
| 2019 | February | 402 | 10731 |
| 2019 | March | 9903 | 10731 |
| 2019 | April | 265 | 10731 |
| 2020 | January | 828 | 62806 |
| 2020 | February | 400 | 62806 |
| 2020 | March | 28801 | 62806 |
| 2020 | April | 5904 | 62806 |
| 2020 | May | 5685 | 62806 |
| 2020 | June | 3209 | 62806 |
| 2020 | July | 2484 | 62806 |
| 2020 | August | 2095 | 62806 |
| 2020 | September | 1823 | 62806 |
| 2020 | October | 3094 | 62806 |
| 2020 | November | 3930 | 62806 |
| 2020 | December | 4553 | 62806 |
| 2021 | January | 2977 | 12569 |
| 2021 | February | 1550 | 12569 |
| 2021 | March | 6338 | 12569 |
| 2021 | April | 441 | 12569 |
| 2021 | May | 512 | 12569 |
| 2021 | June | 751 | 12569 |
Thanks
Solved! Go to Solution.
Hi @abatwara ,
If the count of WO value is written in measure, please refer to the following formula,
result_M = SUMX(FILTER(ALL('Table'),'Table'[Year]=MAX('Table'[Year])),[cout of wo])
if the count of WO value is written in column, please refer to the following formula.
Measure = CALCULATE(SUM('Table'[Count of WO]),FILTER(ALL('Table'),'Table'[Year]=SELECTEDVALUE('Table'[Year])))
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards
Community Support Team _ Polly
Hi @abatwara ,
If the count of WO value is written in measure, please refer to the following formula,
result_M = SUMX(FILTER(ALL('Table'),'Table'[Year]=MAX('Table'[Year])),[cout of wo])
if the count of WO value is written in column, please refer to the following formula.
Measure = CALCULATE(SUM('Table'[Count of WO]),FILTER(ALL('Table'),'Table'[Year]=SELECTEDVALUE('Table'[Year])))
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards
Community Support Team _ Polly
Another way is to achieve the above calculation apart from @Anonymous mentioned is like
_Year Total = CALCULATE(SUM('Table (2)'[Count of WO]),ALLEXCEPT('Table (2)','Table (2)'[Year]))
Proud to be a Super User!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.