Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Friends, how are you doing?
I have the following problem and I would like to have your help.
I have a base where you have the Id_cliente, the code of a product that the customer bought and the amount that he bought. In many cases the customer repeats the purchase of that product, although sometimes he does it with different quantities.
I am needing to determine the median of each product consumed (code), for which I first group it to the code per client so that it adds the total of each one, and then I apply the median. The problem I have with that function is that it only returns the median of those customers who had consumption, and if the client did not consume that product does not take it into account, when I should put value 0.
I share capture, to see if they understand a little more.
Base original
Product grouping by customer
Intended result
Can you think of a solution!?
M
Hi,
Share the link from where i can download your PBI file. Ensure that you already have the table/matrix there already.
Nice day. Attached the file
I need a table where if the product was not consumed put a 0, having that could determine the median correctly.
Thanks a lot!
Hi,
I get an error when i click on that link.
See if this measure works
Mediana_cantidad 1 = MEDIANX(generateall(values(Tabla_precio[Código]),values(Tabla_precio[PRECIO UNITARIO ÚLTIMA COMPRA])),min('Consulta_consumo'[Cantidad_]))
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
87 | |
87 | |
85 | |
67 | |
49 |
User | Count |
---|---|
135 | |
112 | |
100 | |
66 | |
62 |