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.
Hola Tengo una consulta sobre la Suma Acumulada, hay medida Rápidas que acumulan en Base a Fecha u orden alfabético. Tengo una Tabla con Proveedores y Ventas, lo que busco es una DAX que acumule las Ventas tomando como criterio el que tiene Mayor Venta de Mayor a Menor.
Proveedor | Venta |
A | 150 |
B | 200 |
C | 50 |
D | 300 |
Lo que necesito es Ordenar por Venta y que se acumule en Base a la Mayor Venta el Resultado deberia ser:
Proveedor | Venta | Acumulado | <=funcion DAX |
D | 300 | 300 | |
B | 200 | 500 | |
A | 150 | 650 | |
C | 50 | 700 | |
TOTAL | 700 | 700 |
Tienen Alguna idea?
Es decir mi criterio de Ordenación no es la Fecha sino -El que tiene más Venta-.
Agradezco su ayuda.
Saludos
William
Solved! Go to Solution.
Hi @jpaz ,
you could try the following steps:
Step 1, use rankx to sort base data,create a column use the following dax:
Hi @jpaz ,
Use the following dax,You can sort by month group and group for summary:
rank=RANKX(FILTER('Table','Table'[month]=EARLIER('Table'[month])),'Table'[Venta],,desc,Dense)
Wish it is helpful for you!
Best Regards
Lucien
Hi @jpaz ,
you could try the following steps:
Step 1, use rankx to sort base data,create a column use the following dax:
Thanks Lucien!
This is fine when there is little data, but I have a 5 year history and would like to be able to filter by year-month to see the accumulated by provider in each case. What could I do?
Hi @jpaz ,
Use the following dax,You can sort by month group and group for summary:
rank=RANKX(FILTER('Table','Table'[month]=EARLIER('Table'[month])),'Table'[Venta],,desc,Dense)
Wish it is helpful for you!
Best Regards
Lucien
@jpaz , Venta is column
calculate(sumx(filter(values(Table[Proveedor]), table[Venta] <=max(Table[Venta])),Table[Venta]), allselected(Table))
if Venta is a measure
calculate(sumx(filter(values(Table[Proveedor]), [Venta] <=maxX(Table,[Venta])),[Venta]), allselected(Table))
Hi, thanks for your answer
Gracias por tu respuesta
I did a test with the proposed solution, But the result is that the total sum is repeated in each Row.
This is my measure:
What I can do?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
104 | |
87 | |
73 | |
66 |
User | Count |
---|---|
122 | |
112 | |
98 | |
79 | |
72 |