Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
abatwara
New Member

How to calculate dynamic "Total Count of each year" in DAX as shown below?

I want to calculate Total Count of each year in DAX when i have multiple years in my dataset as shown below,

 

YearMonthCount of WOTotal Count of each year
2018March467628
2018April20628
2018May141628
2019January16110731
2019February40210731
2019March990310731
2019April26510731
2020January82862806
2020February40062806
2020March2880162806
2020April590462806
2020May568562806
2020June320962806
2020July248462806
2020August209562806
2020September182362806
2020October309462806
2020November393062806
2020December455362806
2021January297712569
2021February155012569
2021March633812569
2021April44112569
2021May51212569
2021June75112569

 

Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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])))

 

FFDB.PNG

 

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

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])))

 

FFDB.PNG

 

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]))






Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.