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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

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.

amitchandak
Super User
Super User

@hawb ,

No muy claro. Consulte si mi video y archivo (adjunto después de la firma) pueden ayudar

https://youtu.be/CuczXPj0N-k

O referirse

https://www.daxpatterns.com/dynamic-segmentation/
https://www.daxpatterns.com/static-segmentation/
https://www.poweredsolutions.co/2020/01/11/dax-vs-power-query-static-segmentation-in-power-bi-dax-po...
https://radacad.com/grouping-and-binning-step-towards-better-data-visualization

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.