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
mgreez
Advocate II
Advocate II

Biotech Deciling es diferente - DAX HELP

Deciling Accounts by Sales in Biotech es un poco diferente del tipo de n-tile típico Deciling (dividir en 10 grupos par), pero se pondera en función del tamaño relativo de las Ventas.

El proceso en Excel primero ordena las cuentas de mayor a menor por ventas, luego calcula el % del total, luego calcula el total de ejecución del % del total y, a continuación, realiza una vlookup (con TRUE) en la métrica total en ejecución.

¡Estoy luchando con la creación de una medida DAX a partir de esto! ¡Por favor, ayúdenme!

Aquí hay dos tablas:

Ventas de cuentas

AccountIDVentas% del total% acumulado del totalDecil
36241720007.6%8%10
42917819507.4%15%9
83272919507.4%22%8
46711019007.2%30%8
97838318787.1%37%7
45026518006.8%44%6
14354416006.1%50%6
87999915005.7%55%5
82391215005.7%61%4
32347413004.9%66%4
44337312004.5%70%3
33246912004.5%75%3
26734811004.2%79%3
78292310003.8%83%2
9674479003.4%86%2
5590468503.2%90%2
6224908003.0%93%1
5864947502.8%95%1
2036536002.3%98%1
7127726002.3%100%1

Tabla de búsqueda:

Valor de búsquedaDecil
010
0.19
0.28
0.37
0.46
0.55
0.64
0.73
0.82
0.91
10

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hola

Puede descargar mi archivo PBI desde aquí.

Espero que esto ayude.

Untitled.png


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

@Ashish_Mathur @HotChilli

Gracias a ambos por tomarse el tiempo para ayudar!

En última instancia, me encantaría que esto fuera dinámico, lo que significa que sería capaz de seleccionar diferentes períodos de tiempo y que decil se actualizaría automáticamente. En ese caso, ¿sería capaz de comenzar con una tabla calculada como mi VAR en la medida? ¿Podría hacer la clasificación de una tabla calculada dentro de una medida?

Hola

Mi solución es completamente dinámica.


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

@Ashish_Mathur

Por ejemplo, si filtro cualquiera de los AccountIDs, los resultados no se actualizarán en función del nuevo subconjunto de datos.

Otro ejemplo sería donde tengo una dimensión Time y quería filtrar en diferentes períodos de tiempo.

Hola

Por favor, ilustre. Mi solución funcionará.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
HotChilli
Super User
Super User

No estoy seguro de si usted está pidiendo la medida decile o todo lo que no sea el AccountID y Ventas.

Si todo aquí va todo:

En Power Query, ordene la tabla por Sales descendente.

Agregue una columna de índice a partir de 1.

Cerrar y aplicar.

Cree 3 columnas de la siguiente manera:

2Col% of Tot = AccountSales[Sales]/ CALCULATE(SUM(AccountSales[Sales]), ALL(AccountSales))

2Cumu%Total = CALCULATE(SUM(AccountSales[2Col% of Tot]), FILTER(AccountSales, AccountSales[Index] <= EARLIER(AccountSales[Index])))

2Decile = CALCULATE(MIN(TableLookup[Decile]), FILTER(TableLookup,TableLookup[Lookup Value] < AccountSales[2Cumu%Total] )  )

Puede dar formato a las columnas para mostrar los decimales apropiados y como porcentaje

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.