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

Sum specific row then divide to the Total rows

How to create a measure that will sum "Hit" and "Missed" and then will be divided to the Total.

So it will be (2350 + 150) / 6219 = 40.20% (I need percentage).

 

target.PNG

 

Thank you all in advance!

 

 

1 ACCEPTED SOLUTION

Hey,

 

I'm sorry, i forgot to mention the base measure I created and that is used in all the ohter measures:

Count Target = 
COUNT('Table1'[Target]) 

Sorry

Tom

 

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

6 REPLIES 6
Johanno
Continued Contributor
Continued Contributor

Hi, what about:

Percentage hit or missed = CALCULATE(SUM(Table1[Count of target]);Table1[Target]="Hit" || Table1[Target]="Missed")/SUM(Table1[Count of target])

/Johan

Hi @Johanno

 

thanks for the quick response, unfortunately [Count of target] is not a column. It is the Target column itself.

Hey,

 

I created these 3 measures:

the numerator

Count Target Hit and Missed = 
CALCULATE(
    [Count Target]
    ,ALL('Table1'[Target])
    ,OR('Table1'[Target] = "Hit", 'Table1'[Target] = "Missed")
)

the denominator

Count Target ALL = 
CALCULATE(
    COUNT('Table1'[Target]) 
    ,ALL(Table1[Target])
)

and finally the division

the Ratio = 
DIVIDE([Count Target Hit and Missed], [Count Target ALL], BLANK())

using all these measure on a table creates this

image.png

 

Maybe this is what you are looking for

 

Regards

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Hi @TomMartens

 

What's the [Count Target] under the 'Count Target Hit and Missed' stands for? When I tried the formula it says that the "value for 'Count Target' cannot be determined.

 

Thanks

Hey,

 

I'm sorry, i forgot to mention the base measure I created and that is used in all the ohter measures:

Count Target = 
COUNT('Table1'[Target]) 

Sorry

Tom

 

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

 

 

Thanks @TomMartens it worked!

You're a genius!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors