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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

Calculate Average Metric month over month

Hello, 

 

I'm trying to create a visual to show the average month over month for each priority. 

 

If you look at this photo below this shows the data I'm working with: 

 

powerBI Question.JPG

 

For each month within the year I need to show the total for each priority and the percentage of met. Feb for example would show: 27 for the total and 81% for the met. I believe this could be done by creating new columns within the dataset and using IF statements to make them a 1 or 0 after which performing an add and divide. However, I believe there is an easier way. 

 

 

 

Thank you for your help! 

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

Hi @Anonymous 

try measures

Total for priority = CALCULATE(SUM(Table[Count of Incident Number]), ALLEXCEPT(Table, Table[Year], Table[Month], Table[Priority]) )

and

%Met = 
DIVIDE(
CALCULATE(SUM(Table[Count of Incident Number]), ALLEXCEPT(Table, Table[Year], Table[Month], Table[Priority]), Table[Met MTTR] = TRUE() ),
[Total for priority]
)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

5 REPLIES 5
az38
Community Champion
Community Champion

Hi @Anonymous 

try measures

Total for priority = CALCULATE(SUM(Table[Count of Incident Number]), ALLEXCEPT(Table, Table[Year], Table[Month], Table[Priority]) )

and

%Met = 
DIVIDE(
CALCULATE(SUM(Table[Count of Incident Number]), ALLEXCEPT(Table, Table[Year], Table[Month], Table[Priority]), Table[Met MTTR] = TRUE() ),
[Total for priority]
)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

Hi @az38

 

This is very helpful! I did hit a little bit of a snag with this. It appears this requires a measure within a measure for me to get the count of incident number. I've created a measure to perform that; however, I'm getting the below error: 

 

Total for priority = CALCULATE(SUM([Count of Incident Number]), ALLEXCEPT(Sheet1, Sheet1[Year], Sheet1[Month], Sheet1[Priority]) )
The SUM function only accepts a column reference as the argument number 1. / Parameter is not the correct type
 
Have you experienced this before? I also tried to create only 1 line, but still have the same error of incorrect parameter: 
 
Total for priority = CALCULATE(SUM(COUNT(Sheet1[Incident Number]), ALLEXCEPT(Sheet1, Sheet1[Year], Sheet1[Month], Sheet1[Priority]) ))
 
Thank you!!
 
az38
Community Champion
Community Champion

Hi @Anonymous 

for using measure inside SUM() try SUMX() function like

Total for priority = CALCULATE(SUMX(Sheet1, [Count of Incident Number]), ALLEXCEPT(Sheet1, Sheet1[Year], Sheet1[Month], Sheet1[Priority]) )

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

@az38

 

Thank you, that worked brilliantly! I was missing the sheet1 at the beginnning. 

az38
Community Champion
Community Champion

@Anonymous 

You tried to use SUM that does not need a table but can work only with Columns

SUMX(), COUNTX, AVERAGEX() are working with expressions. you can read here https://docs.microsoft.com/en-us/dax/sumx-function-dax


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.