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
hawb
Helper I
Helper I

Creación de ubicaciones dinámicas iguales (mediante percentile.inc)

1.) Tengo una tabla que contiene columnas para Especies de peces y Longitud. E.g.
Bluegill 7.7
Bluegill 8.2
Bluegill 13.2
Crappie 7
Crappie 8.2
Crappe 10.3
2.) Quiero ser capaz de generar una columna en mi tabla que clasificará "Bins" de igual tamaño (es decir, quintiles) por FISH SPECIES.
Encontré una buena referencia sobre cómo hacer esto aquí.
El problema en este ejemplo es que genera las ubicaciones en todo el conjunto de datos en lugar de por especies de peces. ¿Cómo puedo generar dinámicamente estos valores en función de las especies?
Aquí está mi guión de Dax
EqualBinsBySpecies (EqualBinsBySpecies)
--Quintiles
VAR NO. 5
Percentiles de VAR ?
ADDCOLUMNS (GENERATESERIES( 1, N ),"Percentile", PERCENTILE. INC(page_Summary_SurveyMeasurements[LengthInches], [Value] / N )
)

devolución
MINX ( FILTER (Percentiles,page_Summary_SurveyMeasurements[LengthInches] <- [Percentile] ), [Valor] )
1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hola @hawb ,

Prueba esto:

Bucket = 
VAR N = 5
VAR Percentiles =
    ADDCOLUMNS (
        GENERATESERIES ( 1, N ),
        "Percentile", PERCENTILEx.INC ( FILTER('Table',EARLIER('Table'[Fish Species])='Table'[Fish Species]),'Table'[Length. e.g], [Value] / N )
    )
RETURN
    MINX ( FILTER ( Percentiles, 'Table'[Length. e.g] <= [Percentile] ), [Value] )

V-lianl-msft_0-1602039277828.png

Saludos
Liang
Si este post ayuda, entonces considera Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

View solution in original post

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hola @hawb ,

Prueba esto:

Bucket = 
VAR N = 5
VAR Percentiles =
    ADDCOLUMNS (
        GENERATESERIES ( 1, N ),
        "Percentile", PERCENTILEx.INC ( FILTER('Table',EARLIER('Table'[Fish Species])='Table'[Fish Species]),'Table'[Length. e.g], [Value] / N )
    )
RETURN
    MINX ( FILTER ( Percentiles, 'Table'[Length. e.g] <= [Percentile] ), [Value] )

V-lianl-msft_0-1602039277828.png

Saludos
Liang
Si este post ayuda, entonces considera Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

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.