Forum Discussion

prashantPBI's avatar
prashantPBI
Regular Visitor
9 years ago
Solved

Summing values in a field

Hi Everybody,

 

I am working on some Health and Safety Data - could you please help with my problem.

 

I have a cloumn for Safety Classifications, within the coulmn I have Safety Interactions, Good Catch, Near Miss, First Aid, OSHA Recordables.

 

I can do a count on them and their individual numbers -

Safety Interactions - 300

Good Catch - 250

NearMiss - 50

First Aid  - 10

OSHA Recordable - 2

 

What I want to do is sum up Safety Interactions and Good Catch to create a visual in my dashboard that is called Proactives - with a total of 550. How do I do this?

 

Thanks a ton. 

  • Anonymous's avatar
    Anonymous
    9 years ago

     If I understood...

     

     

    Proactives = CALCULATE(COUNT('Data Tracker'[Safety Classification]), 'Data Tracker'[Safety Classification] = "Safety Interactions" ) + 
    CALCULATE(COUNT('Data Tracker'[Safety Classification]), 'Data Tracker'[Safety Classification] = "Good Catch" )

     

    If I not understood, can you show your data?

     

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    prashantPBI,

     

    Create a new measure with the follwing code:

     

    Proactives = COUNT(YOUR_TABLE[Safety Interactions]) + COUNT(YOUR_TABLE[Good Catch])

     

    Hope it helps!

    • prashantPBI's avatar
      prashantPBI
      Regular Visitor

      Hi Anonymous

       

      Thanks. But I should have been clearer. Both Safety Interactions and the Good Catch are within the same column in the table 

       

      So my table name is Data Tracker - 

      Column name is Safety Classification

      The Safety Classification column has all the designations like Safety Interactions and Good Catch and I am having trouble summing that up. 

       

      Hope that makes sense.

       

      • Anonymous's avatar
        Anonymous
        Not applicable

         If I understood...

         

         

        Proactives = CALCULATE(COUNT('Data Tracker'[Safety Classification]), 'Data Tracker'[Safety Classification] = "Safety Interactions" ) + 
        CALCULATE(COUNT('Data Tracker'[Safety Classification]), 'Data Tracker'[Safety Classification] = "Good Catch" )

         

        If I not understood, can you show your data?