cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Syndicate_Admin
Administrator
Administrator

Error al crear un valor de búsqueda a partir de una tabla DAX

Hola Comunidad,

Estoy tratando de buscar valor de una tabla en otra tabla con la que se crearon ambas tablas utilizando la función Summarizecolumns como se muestra a continuación.

Y la razón por la que estoy usando las columnas Summarizecolumns es que hacen que mi modelo funcione más rápido.

Los datos utilizados para imitar mi escenario están disponibles en este enlace -> https://community.tableau.com/s/question/0D54T00000CWeX8SAL/sample-superstore-sales-excelxls

Tabla1

Table1 = SUMMARIZECOLUMNS(
                  Orders[Customer ID],
                  Orders[Category],
                  Orders[City],
                  Orders[Country],
                  Orders[Order ID],
                  "Sum of discount",sum(Orders[Discount])
            )

Cuadro2

Segmenttable = SUMMARIZECOLUMNS(
                 Orders[Customer ID],
                 Orders[Country],
                 Orders[City],
                 "Sum of Sales",SUM(Orders[Sales])
)

Consulta Lookupvalue

LOOKUPVALUE('Table'[Sum of discount],'Table'[Customer ID],Segmenttable[Customer ID])

Recibo este error

A table of mutiple values was supplied where single value was expected.

Humildemente aprecio las ideas para resolver este problema.

Gracias.

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

@iskidet01 , Pruebe una nueva columna como

sumx(filter('Table', 'Table'[Customer ID] = Segmenttable[Customer ID]), 'Table'[Suma del descuento])

View solution in original post

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

@iskidet01 , Pruebe una nueva columna como

sumx(filter('Table', 'Table'[Customer ID] = Segmenttable[Customer ID]), 'Table'[Suma del descuento])

Helpful resources

Announcements
Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Power BI Dev Camp Session 22 768x460.jpg

Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!

Top Kudoed Authors