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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
jabueg
Frequent Visitor

Help Calculating Average Excluding 2 Conditions

I have an existing DAX measure which gets average of completed fields in the "Master AE" table (there's 35 required fields): 

[EPIC %] = CALCULATE(

  DIVIDE([EPIC Points], COUNTROWS('Master AE')*35))
The current measure gives this output on my KPI cards, which is correct:
jabueg_1-1751343272602.png jabueg_2-1751343355500.png

 

 


However, I need to modify it to get a new average that EXCLUDES any rows where Master AE [EPIC Points Count] is <=17 AND the Master AE [Quarter] is > 2.

Or basically, exclude any results from EPIC % measure result <= 49% AND Quarter > 2.


The desired result average should be 40.28% (only 10 values would be averaged per the conditions)

Any idea how I can do this?

jabueg_0-1751328662412.png
Here is the [EPIC points] measure which sums all the points assigned when blanks completed:

jabueg_1-1751330371268.png

 

Appreciate any help!
1 ACCEPTED SOLUTION
jabueg
Frequent Visitor

I figured out the solution. Had to create a calculated a column "Filtered Points" in Table view to filter out the condition and set them to 0  - 

Filtered Points =
IF (
    'Master AE'[EPIC Points Count] <= 17 && 'Master AE'[Quarter #] > 2,
    0,
    [EPIC Points Count]
)
And then created a new measure with the new calculated column:
EPIC Points Risk =
var Points = SUM('Master AE'[Filtered Points])


RETURN
Points


Lastly, created new measure to get average of filtered points (excluding the conditions):


NEW EPIC % =
CALCULATE(
    DIVIDE([EPIC Points Risk], COUNTROWS('Master AE')*35), FILTER('Master AE', 'Master AE'[Filtered Points]<>0))

jabueg_0-1751385567844.png

 



Thanks to all who helped anyway!

View solution in original post

5 REPLIES 5
jabueg
Frequent Visitor

I figured out the solution. Had to create a calculated a column "Filtered Points" in Table view to filter out the condition and set them to 0  - 

Filtered Points =
IF (
    'Master AE'[EPIC Points Count] <= 17 && 'Master AE'[Quarter #] > 2,
    0,
    [EPIC Points Count]
)
And then created a new measure with the new calculated column:
EPIC Points Risk =
var Points = SUM('Master AE'[Filtered Points])


RETURN
Points


Lastly, created new measure to get average of filtered points (excluding the conditions):


NEW EPIC % =
CALCULATE(
    DIVIDE([EPIC Points Risk], COUNTROWS('Master AE')*35), FILTER('Master AE', 'Master AE'[Filtered Points]<>0))

jabueg_0-1751385567844.png

 



Thanks to all who helped anyway!

bhanu_gautam
Super User
Super User

@jabueg ,Try using

[EPIC %] =
CALCULATE(
DIVIDE(
[EPIC Points],
COUNTROWS('Master AE') * 35
),
FILTER(
'Master AE',
'Master AE'[EPIC Points Count] > 17 && 'Master AE'[Quarter] <= 2
)
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






@bhanu_gautam Thanks, but it's giving incorrect result. The expected result should be 40.29%. What should I adjust in the calculation?

(85.71% + 48.57 + 34.29 + 34.29 + 31.43 + 31.43 + 31.43 +31.43 +28.57 +22.86) =  402.87/10 rows 



jabueg_0-1751350778431.png

 

Hi,

as per my understanding, your existing measure does not need CALCULATE and should read

 
EPIC % =
DIVIDE([EPIC Points]COUNTROWS('Master AE')*35)

 

The new measure that must exclude any rows where Master AE [EPIC Points Count] is <=17 AND the Master AE [Quarter] is > 2 should yes use CALCULATE and should read
 
EPIC % Excl = 
CALCULATE ( 
  [EPIC %],
  Master AE [EPIC Points Count] is >17,
  Master AE [Quarter] is <= 2
)

If this helped, please consider giving kudos and mark as a solution

@me in replies or I'll lose your thread

consider voting this Power BI idea

Francesco Bergamaschi

MBA, M.Eng, M.Econ, Professor of BI

Thank you for your response, but it didn't give me the desired result. I was actually able to figure out the solution and posted in my comment.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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