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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
ghe7549
Helper III
Helper III

Unir dos tablas a través de "Etiquetas"

Tengo dos conjuntos de datos (Asset y Subtype) se unen a través de "etiquetas" A continuación, es como el equipo lo armó dentro de SQL, pero lo que estoy obteniendo en PowerBI es el picutre de abajo. Cualquier ayuda sería genial.

es decir, "2dp1Label":"288" en los datos de Asset se une a "source":"2dp1Label" en los datos de subtipo y la decripción: "Coil Width (Total)"
Ancho de bobina (total): 288

más ejemplos:
Altura de la bobina "2dp2Label" (Total): "131"
"1000Char1Label" Notas: "ALL OF WEST WING"
"Int2Label" Suministro de diseño Aire: 124500

image.png

6 REPLIES 6
Icey
Community Support
Community Support

Hola @ghe7549 ,

¿Qué tipo de fuente de datos eres? .txt u otros?

Saludos

Icey

@Icey esto viene de una base de datos Postgres. A continuación se muestra el código que se utilizó en el lado de la base de datos, pero no estoy seguro de cómo usarlo en PBI

SELECT * DESDE user_defined_fields ('277f4f6b-3f47-4e22-86bc-a25440bc1353')
que el parámetro UUID es el id de activo
por lo que SELECT * FROM user_defined_fields (asset_id)

La primera imagen es lo que necesito que suceda en Power BI y los dos siguientes son los que se muestran actualmente en mi columna en Power BI

CMMS.pngUserDefinded.pngUser.png

Icey
Community Support
Community Support

Hola @ghe7549 ,

Para importar los datos a Power BI, puede usar la función Json.Document de la siguiente manera:

let
    ...
    your_table=imported_the_data_directly_from_the_server,
    json=Table.AddColumn(your_table, "NewColName", each Json.Document([user_defined_fields]))
in
    json

Y luego expanda registro a tabla usando

Table.ExpandRecordColumn

O haciendo clic en este botón

expand.png

Por favor, hágamelo saber si esto funciona.

Saludos

Icey

Si este postAyuda, entonces por favor considereAcéptelo como la soluciónpara ayudar a los otros miembros a encontrarlo más rápidamente.

parry2k
Super User
Super User

@ghe7549 podría publicar los datos de muestra y la salida esperada, es muy difícil entender la imagen.

Lea este post para obtener su respuesta rápidamente.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Estoy tratando de unir los datos de activos a los datos de subtye a través de la fuente.

"2dp1Label":"288" en los datos del activo se une a "source":"2dp1Label" en los datos del subtipo y la descripción: "Coil Width (Total)"

Ancho de la bobina (total): 288

Datos de subtipo"2dp2Label" Altura de la bobina (Total): Datos de activos"131"

Altura de la bobina (total): 131
"1000Char1Label"Subtipo datos Notas: Datos de activos"ALL OF WEST WING"
Datos de subtipo"Int2Label" Design Supply Air: Datos de activos124500

/*******************************************
********************************************
Subtype.user_defined_fields ********
********************************************
*******************************************/

{
"uv?":{
"fecha":"",
"type":"Boolean",
"orden":16,
"acción":"",
"length":null,
"fuente":"Bool6Label",
"options":null,
"subtipo":"23.73.13",
"required":false,
"type_code":"23.73.00",
"description":"UV?",
"subtype_code":"23.73.13",
"unit_of_measure":"",
"type_description":"AHU - Indoor Central-Station",
"subtype_description":"AHU modular de interior"
},
"notas":{
"fecha":"",
"type":"String",
"orden":24,
"acción":"",
"length":null,
"source":"1000Char1Label",
"options":null,
"subtipo":"23.73.13",
"required":false,
"type_code":"23.73.00",
"description":"Notes",
"subtype_code":"23.73.13",
"unit_of_measure":"",
"type_description":"AHU - Indoor Central-Station",
"subtype_description":"AHU modular de interior"
},

/*******************************************
********************************************
Asset.user_defined_fields **********
********************************************
*******************************************/

user_defined_fields datos del activo con tag_number: 34407000162

{
"2dp1Label":"288",
"2dp2Label":"131",
"2dp3Label":null,
"2dp4Label":null,
"4dp1Label":null,
"4dp2Label":null,
"4dp3Label":null,
"4dp4Label":null,
"4dp5Label":null,
"4dp6Label":null,
"Int1Label":null,
"Int2Label":124500,
"Bool1Label":true,
"Bool2Label":false,
"Bool3Label":false,
"Bool4Label":true,
"Bool5Label":false,
"Bool6Label":false,
"Date2Label":null,
"Date3Label":null,
"Date4Label":null,
"Date5Label":null,
"Date6Label":null,
"30Char1Label":false,
"30Char2Label":null,
"30Char3Label":null,
"30Char4Label":null,
"60Char1Label":null,
"60Char2Label":null,
"1000Char1Label":"TODO DE ALA OESTE",
"1000Char2Label":null,
"1000Char3Label":null,
"1000Char4Label":null,
"1000Char5Label":null,
"1000Char6Label":null,
"1000Char7Label":"23.73.13"
}

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Top Solution Authors