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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Búsqueda de % coincidente entre dos variables

Hola

Necesito tus luces para calmar el siguiente problema. Me gustaría tener el siguiente resultado:

Si selecciono al empleado A, necesito mostrar qué empoyees coinciden con este empleado en términos de número de habilidades. Digamos emplyoee A tiene 10 habilidades; empoyee B tiene 5, el empleado C tiene 6; / Quiero poder mostrar a los empleados que coincidan con el Empleado A más del 60%. En ese caso, sólo aparecería el empleado C.

Tengo las siguientes tablas:

Mesas:

a) Empleados (que contienen datos emplyoee y códigos de trabajo)

b) Códigos de trabajo (que contienen datos de trabajo e ID de rol)

c) Roles (contiene datos de rol y código de trabajo)

d) Asignación de roles de habilidad (mantiene el ID de rol asignado al ID de habilidad)

e) Habilidades (contiene ID de habilidad y datos de habilidades)

Relaciones:

1) a y b son queridos con el campo de código de trabajo

2) b y c están vinculados con el campo de código de trabajo

3) c y d están vinculados con ID de rol

4) d y e están vinculados con id de habilidad

Muchas gracias por su ayuda.

1 ACCEPTED SOLUTION

No @vhyseni ,

Puede crear dos medidas como se muestra a continuación, por favor encuentre los detalles en el archivo adjunto:

Count of Skills = 
VAR _jobcode =
    CALCULATE (
        MAX ( 'Employee Data'[Job Code] ),
        FILTER (
            'Employee Data',
            'Employee Data'[User ID] = MAX ( 'Employee Data'[User ID] )
        )
    )
VAR _roleid =
    CALCULATE (
        MAX ( 'Job Code and Skills'[RoleID] ),
        FILTER ( 'Job Code and Skills', 'Job Code and Skills'[Job Code ] = _jobcode )
    )
VAR _countofsid =
    CALCULATE (
        DISTINCTCOUNT ( 'Role and Skill Mapping'[Skill ID] ),
        FILTER ( 'Role and Skill Mapping', 'Role and Skill Mapping'[RoleID] = _roleid )
    )
RETURN
    _countofsid
Measure = SUMX(VALUES('Employee Data'[User ID]),[Count of Skills]) 

find match.JPG

Saludos

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

@v-yiruan-msft thanks for your quick reply.  your solution does exactly what i want however, when i implement it on my end, it gives me a syntax error on the line 7. Any idea why could that be?

Hola @vhyseni ,

¿Podría proporcionar la captura de pantalla con la fórmula de medida y el error de sintaxis con el fin de encontrar la causa del error? Es mejor si puede proporcionar el archivo pbix de ejemplo(excluir datos confidenciales). Puede cargar el archivo pbix en OneDrive para la Empresay, a continuación, compartir el vínculo de archivo conmigo. Gracias.

Compartir archivos y carpetas de OneDrive

Saludos

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-yiruan-msft, thanks for your quick response. Much appreicate your help. Actually, I managed to solve the syntax problem. However, when i run the data i get the count of all skills, that is all employees get the same number of skills, which I think it has to do more with the relationships between the tables which is not fully relected on my intial request.  To help better undertand, here is the link to this the pibx file and an ilustration of the result I would like to get. 

Hola @vhyseni ,

No tengo acceso a su archivo al hacer clic en su enlace de archivo compartido. Puede cargar el archivo pbix en OneDrive para la Empresay, a continuación, compartir el vínculo de archivo conmigo. Encontrará los detalles en la siguiente documentación.
Compartir archivos y carpetas de OneDrive

no access to Google Drive.JPG

Saludos

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Seguro. aquí está el enlace onedrive: https://1drv.ms/u/s!Aj77NoruQLbYiAG7lMUEv6X9RlqT?e=hAcjax

No @vhyseni ,

Puede crear dos medidas como se muestra a continuación, por favor encuentre los detalles en el archivo adjunto:

Count of Skills = 
VAR _jobcode =
    CALCULATE (
        MAX ( 'Employee Data'[Job Code] ),
        FILTER (
            'Employee Data',
            'Employee Data'[User ID] = MAX ( 'Employee Data'[User ID] )
        )
    )
VAR _roleid =
    CALCULATE (
        MAX ( 'Job Code and Skills'[RoleID] ),
        FILTER ( 'Job Code and Skills', 'Job Code and Skills'[Job Code ] = _jobcode )
    )
VAR _countofsid =
    CALCULATE (
        DISTINCTCOUNT ( 'Role and Skill Mapping'[Skill ID] ),
        FILTER ( 'Role and Skill Mapping', 'Role and Skill Mapping'[RoleID] = _roleid )
    )
RETURN
    _countofsid
Measure = SUMX(VALUES('Employee Data'[User ID]),[Count of Skills]) 

find match.JPG

Saludos

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yiruan-msft
Community Support
Community Support

Hola @vhyseni ,

He creado un archivo pbix de muestra (ver archivo adjunto), por favor compruebe si eso es lo que desea.

Finding % match between two variables.JPG

Saludos

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.