Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Get the right measure

Hi,

 

I have the table below, and current measure to calculate the

YTD Race Rate = [ YTD Start Headcount by Race]/[ YTD Start Headcount ALL Race] (results are in column YTD Race Rate)

And what I need instead is to get:

YTD Race Rate =YTD Start Headcount by Race/Total YTD Start Headcount ALL Race which is the "Reuired Results"

 

Race NameYTD Start Headcount by RaceYTD Start Headcount ALL RaceYTD Race RateRequired Results
A1811415.8%15.8%
B1110510.5%9.6%
C21111.8%1.8%
D5846.0%4.4%
E1234.3%0.9%
F1911.1%0.9%
G4844.8%3.5%
H7211463.2%63.2%
Total114114  

 

To give you more context about the measures above, below are the measures I have for above table:

1- YTD Start Headcount = CALCULATE(COUNT(Table Name[Job Req]), DATESYTD(able Name[CF - Hire Date (Job Req)]),able Name[Job Requisition Status]="Filled",TA_Talent_Feed[Country]="Country Name")
 
2- YTD Start Headcount ALL Race= CALCULATE(COUNT(Table Name[Job Req]), DATESYTD(Table Name[CF - Hire Date (Job Req)]),Table Name[Job Requisition Status]="Filled",Table Name[Country]="Country Name",ALL(Table Name[Race]))
 
3-YTD Race Rate = [YTD Start Headcount]/[YTD Start Headcount ALL Race]
 
Anyone could help me with getting the right measure and get the results as the column "required results"?
 
 
Thank you!
  • You're welcome! That shouldn't be an issue. Just update the measure as seen below:

    Required Result Measure = 
    VAR Numerator =
        [YTD Start Headcount by Race]
    VAR Denominator =
        CALCULATE (
            [YTD Start Headcount by Race],
            ALL ( 'Table Name'[Race Name] )
        )
    VAR Result =
        DIVIDE ( Numerator, Denominator )
    RETURN
        Result

    I also update the PBIX linked in the earlier reply.

4 Replies

  • SteveHailey's avatar
    SteveHailey
    Icon for Solution Specialist rankSolution Specialist

    Hello,

    Try something like this:

    Required Result Measure = 
    VAR Numerator =
        SUM ( 'Table Name'[YTD Start Headcount by Race] )
    VAR Denominator =
        CALCULATE (
            SUM ( 'Table Name'[YTD Start Headcount by Race] ),
            ALL ( 'Table Name'[Race Name] )
        )
    VAR Result =
        DIVIDE ( Numerator, Denominator )
    RETURN
        Result

    Here is a link to a PBIX.

     

    -Steve

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello Steve,

       

      Thank you for your quick response! I was trying your suggested measure, but I coulnd't get the correct measure as the "YTD Start Headcount by Race" is a measure not a column. Is there any other possible way to get arround this?

       

      • SteveHailey's avatar
        SteveHailey
        Icon for Solution Specialist rankSolution Specialist

        You're welcome! That shouldn't be an issue. Just update the measure as seen below:

        Required Result Measure = 
        VAR Numerator =
            [YTD Start Headcount by Race]
        VAR Denominator =
            CALCULATE (
                [YTD Start Headcount by Race],
                ALL ( 'Table Name'[Race Name] )
            )
        VAR Result =
            DIVIDE ( Numerator, Denominator )
        RETURN
            Result

        I also update the PBIX linked in the earlier reply.