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.

Reply
JordanJackson
Advocate II
Advocate II

How do I create this measure to filter out scores of 0?

Hi there, 

 

I started out with the following measure 

Average Score New (%) =  AVERAGE( 'Scores'[Score]) / 5 ) * 100

 

This gave an average score in the percentage format which is the desired way for this measure. However i noticed that it was taking 0's into account. And so I tried to adapt the measure as seen below in the picture to filter out scores of 0. 

 

Screenshot (29).png

 

If anyone knows the correct dax in order to show this average as a percentage whilst filtering out 0's please do let me know.

 

Thanks

1 ACCEPTED SOLUTION
PabloDeheza
Solution Sage
Solution Sage

Hi there!

I think your measure should look more like this:

Average Score New (%) =
CALCULATE(
AVERAGE( 'Scores'[Score] ) / 5,
'Scores'[Score] <> 0
) * 100
 
Let me know if that works!
Cheers!

View solution in original post

4 REPLIES 4
PabloDeheza
Solution Sage
Solution Sage

Hi there!

I think your measure should look more like this:

Average Score New (%) =
CALCULATE(
AVERAGE( 'Scores'[Score] ) / 5,
'Scores'[Score] <> 0
) * 100
 
Let me know if that works!
Cheers!

This works for me, thankyou so much!

ryan_mayu
Super User
Super User

@JordanJackson 

pls try 

=CALCULATE(AVERAGE('Scores'[Score]), FILTER('Scores','Scores'[Score]<>0)) /5 * 100





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

Proud to be a Super User!




This also works! Thankyou for your help!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.