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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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