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

Extracción de datos de JSON en Power BI

Hola Equipo,

Estoy extrayendo datos de MongoDB en Power BI y los datos están en formato de documento.

(

id:- 1

nombre :- Shubham

Posición :- Desarrollador

}

(

id:- 2

nombre :- Intercambionil

Posición :- Desarrollador Senior

}

(

id:- 3

nombre :- Fayaz

}

Ahora se supone que son 3 filas y 3 columnas en Power BI, pero la columna Position no está disponible en el 3er JSON debido a la cual solo identifica y nombra excluyendo la columna Position de todo el conjunto de datos.

IdNombre
1Shubham
2Swapnil
3Fayaz

Pero quería resultar en ser así :-

IdNombrePosición
1ShubhamDesarrollador
2SwapnilSenior Develop
3FayazNull

¿Podrías por favor ayudarme con esto?

3 REPLIES 3
v-lili6-msft
Community Support
Community Support

hola @ShubhamK

Tengo una prueba de mi lado, funciona bien.

3.JPG

y aquí está el código de consulta de energía:

let
    Source = Json.Document(File.Contents("C:\Users\linli\Desktop\test.json")),
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"id", "name", "Position"}, {"id", "name", "Position"})
in
    #"Expanded Column1"

saludos

Lin

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

No puedo conseguir que ese JSON valide tan difícil de ayudar.

https://jsonlint.com/

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler Por favor, encuentre JSON corregido

[{
"id": 1,
"name": "Shubham",
"Position": "Desarrollador"
},
{
"id": 2,
"name": "Swapnil",
"Position": "Desarrollador Senior"
},
{
"id": 3,
"name": "Fayaz"
}
]

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.