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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Porcentaje acumulado de compras a proveedores

Hola

Quiero encontrar el porcentaje acumulado de las compras realizadas a los proveedores.

Tengo una medida que calcula el total de compras por proveedor:

Compras de productos: SUMX(VALUES('All'[Nom fournisseur]),CALCULATE(SUM('All'[Valeur CHF])))
Y traté de calcular el porcentaje acumulado :
Porcentaje acumulado ?
var sales-CALCULATE(SUM('All'[Valeur CHF]),FILTER(ALLSELECTED('All'[Nom fournisseur]),ISONORAFTER('All'[Nom fournisseur],MAX('All'[Nom fournisseur]),DESC))))
var totalsales-CALCULATE(SUM('All'[Valeur CHF]),ALLSELECTED('All'))
retorno DIVIDE(ventas, totalventas)

Sin embargo, con esta forma de hacer las cosas, la acumulación se realiza por el nombre del proveedor alfabético y no por la cantidad total de compras.

Picture1.png

¿Puede ayudarme por favor a hacer la acumulación por la cantidad total de compras por proveedor?

Gracias de antemano.

Albers

1 ACCEPTED SOLUTION

hola

Puede descargar mi archivo PBI desde aquí.

Espero que esto ayude.

Untitled.png

View solution in original post

13 REPLIES 13
amitchandak
Super User
Super User

Puede acumular por el proveedor o por tiempo. No está muy claro lo que quieres

durante el tiempo que podría haber hecho como Cumm Sales - CALCULATE(SUM(Sales[Sales Amount]),filter(date,date[date] <-maxx(date,date[date])))

Anonymous
Not applicable

Gracias por su respuesta @amitchandak !

Quiero acumular por la columna (medida) Compras de productos.

Pero como es una medida, no puedo usar la función MAX() como usted dice...

hola @AlBers

Simplemente ajuste la fórmula como se muestra a continuación:

Cumulative Percentage = 
var sales=CALCULATE(SUM('All'[Valeur CHF]),FILTER(ALLSELECTED('All'),'All'[Valeur CHF]<=SUM('All'[Valeur CHF])))
var totalsales=CALCULATE(SUM('All'[Valeur CHF]),ALLSELECTED('All'))
return
DIVIDE(sales,totalsales)

saludos

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hola @v-lili6-msft,

Gracias por su respuesta.

Pero su fórmula me da el siguiente caso:

Picture1.png

Parece que la acumulación se hace en la dirección equivocada y que el porcentaje se calcula erróneamente ...

hola @AlBers

Si es así, simplemente ajuste la fórmula como se muestra a continuación:

Cumulative Percentage = 
var sales=CALCULATE(SUM('All'[Valeur CHF]),FILTER(ALLSELECTED('All'),'All'[Valeur CHF]>=SUM('All'[Valeur CHF])))
var totalsales=CALCULATE(SUM('All'[Valeur CHF]),ALLSELECTED('All'))
return
DIVIDE(sales,totalsales)

saludos

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hola @v-lili6-msft,

Todavía no funciona ("Porcentaje acumulado 2") ...

Picture1.png

Tal vez tenemos que utilizar una medida como esta :

Compras de productos: SUMX(VALUES('All'[Nom fournisseur]),CALCULATE(SUM('All'[Valeur CHF])))

Se utiliza para calcular la suma de los valores de compras por proveedor.

¡Muchas gracias! ¡Saludos!

Hola

Comparte el enlace desde donde puedo descargar tu archivo PBI.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hola @Ashish_Mathur y @v-lili6-msft,

Gracias por sus respuestas !

Aquí está el archivo pbix de ejemplo: https://we.tl/t-lmOY1iuUBz

Las dos soluciones reales dan un resultado incorrecto ...

Saludos

hola

Puede descargar mi archivo PBI desde aquí.

Espero que esto ayude.

Untitled.png

¡¡¡Muy bien!!!

Muchas gracias @Ashish_Mathur !!!

Que tengas una agradable tarde, saludos cordiales.

De nada. Si mi respuesta ayudó, por favor márquela como Respuesta.

hola @AlBers

Si es posible, ¿podría compartir su archivo pbix de muestra para que tengamos una prueba? que será una gran ayuda.

saludos

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

¿Cómo debo hacerlo?

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.