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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Participación de un producto de acuerdo a su aparición

Hola Chicos,

 

En esta ocasión estoy queriendo responder la siguiente pregunta: Cuales son las combinaciones de productos que mas se dan por cada compra que realiza el cliente, pero en este caso que se pueda seleccionar el producto a ser evaluado. Todo esto en Power BI Desktop.

 

A continuacion unos datos de ejemplo:

 

Datos de ejemplo:

 

Id ProductosNombre ProdID Transaccion
30Vitamina9001
30Vitamina1001
40Agua1001
30Vitamina3001
40Agua3001
10Ponstan3001
30Vitamina4001
40Agua4001
10Ponstan4001
10Ponstan5001
80Jugo2001

 

 

Resultados:

 

image.png

 

En la variable Productos, me salen todos los productos existentes. 

En la variable Apariciones, me salen todas las apariciones de cada producto por cada ID de transacción diferente en la que el producto Vitamina aparece.

En la variable Porc%, es la participación de cada producto de acuerdo a su aparición. Mas específicamente esta variable es la división entre la aparición de cada producto y el máximo de apariciones del producto seleccionado. Por ejemplo: 4/4 = 1  (aparición del producto)/(Máxima apariciones del producto a analizar) = 1.

 

Nota:

Quisiera hacer esto a traves de DAX en Power BI.

 

Quedo atento a sus respuestas,

 

De antemano muchas gracias,

Saludos,

 

1 ACCEPTED SOLUTION
AlB
Super User
Super User

Hi @Anonymous 

See the attached file for a possible solution

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

Cheers 

 

SU18_powerbi_badge

 

View solution in original post

3 REPLIES 3
AlB
Super User
Super User

Hi @Anonymous 

See the attached file for a possible solution

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

Cheers 

 

SU18_powerbi_badge

 

amitchandak
Super User
Super User

@Anonymous , logic of Apariciones and Porc% is not very clear.

Anonymous
Not applicable

Hi, @amitchandak ,

 

I just change the original Post for more clear, let me know if you understand better now.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors