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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.