Forum Discussion

Nestor_Moreno's avatar
Nestor_Moreno
Frequent Visitor
5 years ago
Solved

Counting Measure Results

Hello community,

 

I need count the results of a measure, i try to explain my problem.

 

I have 3 tables:

  1. Reg_Beneficiario_Empleabilidad (this is a personal information of workers)
  2. Vinculacion (this is a information about work, when start, where, what he doing, etcc )
  3. Medidas (this is a measure table)

I need to know how many workers stay in the work after 90 days.

 

In my measure table (Table3), i have 3 measures:

  1. Date to starts to work:
    • Fecha_Vinculacion = MAX(Vinculacion[Fecha_Vinculacion_Ok])
  2. Date to finish to work:
    • Fecha_Finalizo_Proceso = MIN(Reg_Beneficiario_Empleabilidad[Fecha_Finalizo_Proceso_Ok])
  3. Working Days:
    • Dias_Vinculación = IF(ISBLANK([Fecha_Finalizo_Proceso]),VALUE(TODAY())-VALUE([Fecha_Vinculacion]),VALUE([Fecha_Finalizo_Proceso])-VALUE([Fecha_Vinculacion]))

I Show this in a table:

 

 

Now, my problem is, that i need to know how many workers stay in the work after 90 days. 

 

How i can count how many registers are >= to 90 days if this is a measure. 

 

 

Thanks for your valuable help.

 

Regards.

  • AlB's avatar
    AlB
    5 years ago

    Nestor_Moreno 

    Place this measure in the same visual and you'll have the sum at the total row (and 1 or zero in each of the other rows depending on if the employee has or not been with the company for > 90 days)

    New Measure Total V2 =
    SUMX (
        DISTINCT ( Reg_Beneficiario_Empleabilidad[ID beneficiario] ),
        ([Dias_Vinculación]> 90) * 1
    )

    Or you can just place it in a card visual to have the total on it 

     

    Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

    Contact me privately for support with any larger-scale BI needs, tutoring, etc.

    Cheers 

     

3 Replies

  • AlB's avatar
    AlB
    Icon for Community Champion rankCommunity Champion

    Hi Nestor_Moreno 

    Try this measure that uses the one you already have. Place it in the visual:

    New Measure Total =
    SUMX (
        DISTINCT ( Reg_Beneficiario_Empleabilidad[ID beneficiario] ),
        [Dias_Vinculación]
    )
    

     

    Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

    Contact me privately for support with any larger-scale BI needs, tutoring, etc.

    Cheers 

    • Nestor_Moreno's avatar
      Nestor_Moreno
      Frequent Visitor

      Hi AlB ,

       

      Thanks for your answer, but how i Could count the workers that have more of 90 days in the work (Dias_Vinculación)?

       

      With your formula are adding up. 

       

      Thanks for your help. 

       

      Regards

       

       

      • AlB's avatar
        AlB
        Icon for Community Champion rankCommunity Champion

        Nestor_Moreno 

        Place this measure in the same visual and you'll have the sum at the total row (and 1 or zero in each of the other rows depending on if the employee has or not been with the company for > 90 days)

        New Measure Total V2 =
        SUMX (
            DISTINCT ( Reg_Beneficiario_Empleabilidad[ID beneficiario] ),
            ([Dias_Vinculación]> 90) * 1
        )

        Or you can just place it in a card visual to have the total on it 

         

        Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

        Contact me privately for support with any larger-scale BI needs, tutoring, etc.

        Cheers