Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hola! soy nuevo en Power BI
Quisiera saber si hay alguna manera de poder comparar los datos de dos tablas, con una relacion de una columna en común, para saber que datos no se repiten en una de las tablas.
Me explico:
Tengo dos tablas, una tiene toda la informacion de todas las ventas por producto y cliente
EJEMPLO:
NOMBRE | CODIGO | ARTICULO | CANTIDAD | FECHA |
JUAN PEREZ | JBN20 | JABON | 94 | 22-01-2024 |
JUAN PEREZ | SPU98 | SHAMPOO | 56 | 23-01-2024 |
JUAN PEREZ | DNT65 | DESODORANTE | 32 | 08-03-2024 |
JUAN PEREZ | CMA73 | CREMA FACIAL | 42 | 10-03-2024 |
...
Y la otra tiene el catalogo de todos los productos existentes:
CODIGO | ARTICULO |
JBN20 | JABON |
SPU98 | SHAMPOO |
DNT65 | DESODORANTE |
CMA73 | CREMA FACIAL |
PFM58 | PERFUME |
MRA55 | MASCARILLA |
...
Hasta ahora con excel comparaba las dos tablas poniendoles un formato condicional para que resaltara los valores unicos de la tabla 2
De esta manera obtenia que productos no habia comprado cierto cliente, (ej. Daniela no compró shampoo, desodorante ni mascarillas) y tambien podia filtrarlo por mes con la tabla dinamica.
Sin embargo el catalogo de productos es extenso y ocupa muchas filas, por lo que hacer esto no es tan practico.
Mi pregunta es, ¿hay alguna manera de hacer esto en PowerBI?, es decir obtener los productos que un cliente no ha comprado filtrando por cliente, y por mes, mediante una relacion de las dos tablas con la informacion.
Gracias por la ayuda
Solved! Go to Solution.
Hi @m14b
You can refer to the following solution.
Sample data
Customer_sales table
Product table
Calendar table
there is no relationship between product and customer table, there is a 1:N relationshop between customer and calendar table.
Create a measure
Except_product =
VAR a =
VALUES ( 'Customer_sales'[Product] )
VAR b =
VALUES ( 'Product'[Product] )
RETURN
COUNTROWS ( EXCEPT ( b, a ) )
Create a table visual and put the product column of product table and the measure to the visual.
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @m14b
You can refer to the following solution.
Sample data
Customer_sales table
Product table
Calendar table
there is no relationship between product and customer table, there is a 1:N relationshop between customer and calendar table.
Create a measure
Except_product =
VAR a =
VALUES ( 'Customer_sales'[Product] )
VAR b =
VALUES ( 'Product'[Product] )
RETURN
COUNTROWS ( EXCEPT ( b, a ) )
Create a table visual and put the product column of product table and the measure to the visual.
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much, it was just what i needed
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
76 | |
55 | |
37 | |
34 |
User | Count |
---|---|
99 | |
56 | |
53 | |
44 | |
40 |