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.
Me gustaría probar las columnas de expansión dinámica en código M.
El código es:
fxFactorial = (RowCount como número, Tnumber como número, tbl como tabla) = >
dejar
displayname = "disPath" & Text.From(Tnumber),
childrenname = "niños" & Text.From(Tnumber),
prevchildname = "niños" y Text.From(Tnumber-1) ,
prevstep = tbl ,
Source2 = Table.ExpandListColumn( prevstep, prevchildname),
#"Added disPath2" = Table.AddColumn(Source2, displayname, each Record.Field(prevchildname,"displayPath") ),
#"Added children2" = Table.AddColumn(#"Added disPath2", childrenname, each try Record.Field([children1],"children") de lo contrario null ),
ColRowCount = List.NonNullCount( #"Added children2"[children2]),
titlenumber = Tnumber + 1,
subresult = if titlenumber > 2 then @fxFactorial(ColRowCount, titlenumber, #"Added children2") else #"Added children2"
en
#"Añadido disPath2"
Pero, estoy recibiendo un error que indica como No podemos convertir el valor "children1" a Record
Se agradece mucho que alguien haya mostrado algo de luz sobre esta consulta.
Está utilizando la variable prevchildname (un valor de texto) en una función que espera un registro (Record.Field).
Palmadita
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 |