Forum Discussion

jcastr02's avatar
jcastr02
Post Prodigy
5 years ago
Solved

Divide 2 numbers

I have table with two count types -     Coaching & Headcount.  I am trying to get a measure that will divide    ( sum of coaching / sum of headcount)   See attached.  

 

Example, Under Location Chandler

 

ChandlerCoachingHeadcount  Calculation Needed w Measure
9/1/202071728.0975
10/1/2020303737.4111
11/1/2020111752.1476
12/1/2020252727.3466

       

  • jcastr02 

    Add this as a new measure:

    Measure = 
    DIVIDE(
        CALCULATE( SUM(Table[Count]), Table[Count Type] = "Coaching"),
        CALCULATE( SUM(Table[Count]), Table[Count Type] = "Headcount")
    )

    ________________________

    If my answer was helpful, please click Accept it as the solution to help other members find it useful

    Click on the Thumbs-Up icon if you like this reply ๐Ÿ™‚


    Website YouTube  LinkedIn

3 Replies

  • jcastr02 

    Add this as a new measure:

    Measure = 
    DIVIDE(
        CALCULATE( SUM(Table[Count]), Table[Count Type] = "Coaching"),
        CALCULATE( SUM(Table[Count]), Table[Count Type] = "Headcount")
    )

    ________________________

    If my answer was helpful, please click Accept it as the solution to help other members find it useful

    Click on the Thumbs-Up icon if you like this reply ๐Ÿ™‚


    Website YouTube  LinkedIn

  • You posted this question in the Power Query forum. Are you looking for an answer to apply in Power Query? It's really NOT the best tool for this job. Fowmy seems to have the best suggestion: build this solution with DAX measures, not in Power Query.