Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (11.1k points)

I want to calculate the average scores of students exclude the scores that are zero

measure= calculate(average(table[score]),filter(table, table[score]<>0))

And I want to compare the measure by selecting student against the slicer

ew measure= calculate(average(table[score]),all(table[student]),filter(table, table[score]<>0))

How can use the new measure in the score and ignore the slicer 

1 Answer

0 votes
by (22.5k points)

Use AverageX and IF in calculated feilds

Average Excluding Zero =
AVERAGEX (
    Table,
    IF ( Table[Score] <> 0, Table[Score] )
)
All Students Average Excluding Zero =
CALCULATE (
    [Average Excluding Zero],
    ALL ( Table[Student] ) 

) 

If you want to learn more about Power BI, then read the Power BI Tutorial. Also, enroll in Power BI Training to become proficient in this BI tool.     

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Feb 28, 2021 in BI by Chris (11.1k points)
0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...