Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hola, tenemos dos tablas en pbix, "Table1" y "Table2".
¿puede alguien ayudarme a escribir una "Medida" para este requisito? que pueden reemplazar los valores de la tabla 1 por la tabla 2 (no hay relaton entre tablas).
Gracias de antemano.
Hola @yodha ,
Por favor, compruebe:
1. Intente reemplazar el valor en el editor de Power Query.
= Table.ReplaceValue(#"Changed Type",each [Value], each if [Group]=false and [Type] = false and [#"Sub-type"]=false then (let Name_ = [Name] in Table.SelectRows(#"Table 2", each [Name] = Name_ and [Type] = "new")){0}[Value] else [Value],Replacer.ReplaceValue,{"Value"})
2. O bien, puede crear una columna calculada o una medida en Power BI Desktop.
Column =
IF (
'Table 1'[Group] && 'Table 1'[Type]
&& 'Table 1'[Sub-type],
'Table 1'[Value],
CALCULATE (
SUM ( 'Table 2'[Value] ),
FILTER (
'Table 2',
'Table 2'[Name] = 'Table 1'[Name]
&& 'Table 2'[Type] = "new"
)
)
)
Measure =
IF (
SELECTEDVALUE ( 'Table 1'[Group] ) && SELECTEDVALUE ( 'Table 1'[Type] )
&& SELECTEDVALUE ( 'Table 1'[Sub-type] ),
SUM ( 'Table 1'[Value] ),
CALCULATE (
SUM ( 'Table 2'[Value] ),
FILTER (
'Table 2',
'Table 2'[Name] = SELECTEDVALUE ( 'Table 1'[Name] )
&& 'Table 2'[Type] = "new"
)
)
)
BTW, archivo .pbix adjunto.
Saludos
Icey
Si este post ayuda,entonces considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
Hola @yodha ,
¿Por qué no usa Power Query?
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
@mwegener Sí, Powerquery también funciona, pero soy nuevo en Power BI y no sé cómo obtener el resultado esperado mediante la consulta de energía. ¡Gracias!
Hola @yodha ,
Iría paso a paso.
1. Genere columnas en la tabla 2 que necesita vincular a la tabla 1. (Columnas condicionales)
2. Combine las tablas sobre estas columnas.
3. Busque el valor deseado utilizando una columna condicional.
Eche un vistazo al PBIX adjunto.
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.