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
Syndicate_Admin
Administrator
Administrator

PATH() Error

Hola, chicos.

Tengo la siguiente tabla con el Gerente y el Empleado:

azakir_0-1702266163701.png

Me gustaría mostrarlo en una matriz cuando se expande el gerente, muestra al personal que reporta al gerente. El problema es que hay ejemplos en los que el propio personal es gerente de otro personal. Idealmente, me gustaría mostrar Raymond Latter expandido a John Stamos y luego expandido a Cath Geleilo.

@Jihwan_Kim ayudó con la función PATH(). Sin embargo, obtengo el siguiente error:

El valor 'Raymond Latter' en 'HR_DW_Import'[Manager_DisplayName] también debe existir en 'HR_DW_Import'[PATH CC2]. Agregue los datos que faltan e inténtelo de nuevo.

¿Hay alguna manera de resolver esto?

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

Hola @azakir ,

Estos son los pasos que puedes seguir:

1. Crear columna calculada.

Test =
var _select=SELECTCOLUMNS('Table',"Man",[Manager_DisplayName])
var _test1=
CONCATENATEX(
    FILTER(ALL('Table'),
    'Table'[Manager_DisplayName]=EARLIER('Table'[Manager_DisplayName])),[Employee],"|")
var _table1=
SUMMARIZE(
    'Table','Table'[Manager_DisplayName],
    "Employe11",
    CONCATENATEX(
        FILTER(ALL('Table'),
        'Table'[Manager_DisplayName]=EARLIER('Table'[Manager_DisplayName])),[Employee],"|"))
var _test2=
IF(
    'Table'[Employee] in _select ,
    MAXX(
        FILTER(_table1,[Manager_DisplayName] =EARLIER('Table'[Employee])),[Employe11]))
return
_test1 &"|"&_test2

2. Resultado:

vyangliumsft_0-1702449300259.png

Saludos

Liu Yang

Si esta publicación ayuda, considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente

Gracias @v-yangliu-msft que hizo el truco por mí. Saludos por tu ayuda

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.