Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hola
Estoy tratando de obtener filas únicas para uno de mis orígenes de datos. Los datos tienen este aspecto:
Y me gustaría tener una mesa como esta:
Notas:
En mis datos originales, no todos los productos tienen 2 líneas
Tengo varias columnas con este mismo propósito, así que me gustaría una solución que funcione en una base de datos más grande
Gracias de antemano (:
Solved! Go to Solution.
Hola @GabrielFz ,
Según mi prueba, la expresión @amitchandak proporcionada es un poco problemática. Por favor, modifíquelo así:
Table 2 =
VAR t =
SELECTCOLUMNS (
'Table',
"Product", 'Table'[product],
"Quantity A", IF ( 'Table'[Location] = "A", 'Table'[Quantity], BLANK () ),
"Quantity B", IF ( 'Table'[Location] = "B", 'Table'[Quantity], BLANK () ),
"Delivery Date A", IF ( 'Table'[Location] = "A", 'Table'[Delivery Date], BLANK () ),
"Delivery Date B", IF ( 'Table'[Location] = "B", 'Table'[Delivery Date], BLANK () ),
"Color", 'Table'[Color]
)
RETURN
SUMMARIZE (
t,
[product],
[Color],
"Quantity A", SUMX ( t, [Quantity A] ),
"Quantity B", SUMX ( t, [Quantity B] ),
"Delivery Date A", MAXX ( t, [Delivery Date A] ),
"Delivery Date B", MAXX ( t, [Delivery Date B] )
)
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 @GabrielFz ,
Según mi prueba, la expresión @amitchandak proporcionada es un poco problemática. Por favor, modifíquelo así:
Table 2 =
VAR t =
SELECTCOLUMNS (
'Table',
"Product", 'Table'[product],
"Quantity A", IF ( 'Table'[Location] = "A", 'Table'[Quantity], BLANK () ),
"Quantity B", IF ( 'Table'[Location] = "B", 'Table'[Quantity], BLANK () ),
"Delivery Date A", IF ( 'Table'[Location] = "A", 'Table'[Delivery Date], BLANK () ),
"Delivery Date B", IF ( 'Table'[Location] = "B", 'Table'[Delivery Date], BLANK () ),
"Color", 'Table'[Color]
)
RETURN
SUMMARIZE (
t,
[product],
[Color],
"Quantity A", SUMX ( t, [Quantity A] ),
"Quantity B", SUMX ( t, [Quantity B] ),
"Delivery Date A", MAXX ( t, [Delivery Date A] ),
"Delivery Date B", MAXX ( t, [Delivery Date B] )
)
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.
@GabrielFz, crear una nueva tabla como
summarize(
selectcolumns(Table,"Product", Table[product],"Quantity A",if(Table[Location] ="A",Table[Quantity],blank())
,"Quantity B",if(Table[Location] ="B",Table[Quantity],blank())
,"Delivery Date A",if(Table[Location] ="A",Table[Delivery Date],blank())
,"Delivery Date B",if(Table[Location] ="B",Table[Delivery Date],blank())
,"Color", table[Color]),[product],[Color],"Quantity A",sum([Quantity A]),"Quantity B",sum([Quantity B])
,"Delivery Date A",max([Delivery Date A]),"Delivery Date B",Max([Delivery Date B]))
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.