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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Average based on criteria on same column

Hi I have a data that looks like this

Names#No% Completion
A197.50%
D488.89%
E573.38%
F5100.00%
G6100.00%
N1382.08%
O1383.75%
P1486.67%
Q1484.50%


What i want to achieve is basically  = Completion / Count of No that has the same value. Refer to Average % Completion column below:

Names#No% CompletionAverage % Completion
A197.50%97.00%
D488.89%88.89%
E573.38%86.69%
F5100.00%86.69%
G6100.00%100.00%
N1382.08%82.92%
O1383.75%82.92%
P1486.67%85.59%
Q1484.50%85.59%

 

% Completion is a measure = Average(Completion) based on Names.
So basically now what is want is Average of ( Average(completion) based on names) based on #No

And my final table will be WITHOUT #No Column

Names% CompletionAverage % Completion
A97.50%97.00%
D88.89%88.89%
E73.38%86.69%
F100.00%86.69%
G100.00%100.00%
N82.08%82.92%
O83.75%82.92%
P86.67%85.59%
Q84.50%85.59%

I have tried  some of calculation but most of it doesnt work after i get rid of #No column


Thanks.

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

Try:

 

Measure = 
VAR __no = MAX([#No])
VAR __table = FILTER(ALL(Table1),[#No] = __no)
RETURN
AVERAGEX(__table,[% Completion])

See attached.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi @Greg_Deckler  & @HotChilli ,

Weirdly i used both of your formula on my dummy table it works, but when i used it on my real data it doesnt work. FYI i filter by year (single select) is it somehow one of the reason why it doesnt work? 

HotChilli
Super User
Super User

Removing '#No' from your visualisations changes context so I think you need something like this

Measure  = 
CALCULATE (
    AVERAGE(Table[% Completion]), 
    FILTER (
        ALL ( Table ), 
        Table[#No] = MAX ( Table[#No] )
    )
)

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors