Forum Discussion
Help Calculating Average Excluding 2 Conditions
- 1 year ago
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])RETURNPoints
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))
Thanks to all who helped anyway!
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
)
)
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
- FBergamaschi1 year agoSuper User
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 readEPIC % 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 ideaFrancesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
- jabueg1 year agoHelper I
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.