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
Syndicate_Admin
Administrator
Administrator

Clasificación de la matriz

Hola a todos

Mis datos están en una matriz (como a continuación) y me gustaría que el ranking en TIPO fuera fijo 1) zapatos 2) ropa 3) accesorios 4) cocina pero cuando expando el signo +, me gustaría que la medida se clasificara por orden descendente. ¿Es esto posible? muchas gracias por la valiosa ayuda 🙂

Mi conjunto de datos tiene el siguiente aspecto:

evko_0-1634735295107.png

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

Hay @evko ,

Deberá crear otra medida para calcular el valor por tipo.

Por ejemplo:

Measure = SUM('Table'[value])

Measure 2 = CALCULATE(SUM('Table'[value]),ALLEXCEPT('Table','Table'[type]))

Luego use la función ISFILTERED() para obtener un rango diferente.

Measure 3 = 
var _unexpand = RANKX(ALLSELECTED('Table'),[Measure 2],,ASC,Dense)
var _expand = RANKX(ALLEXCEPT('Table','Table'[color]),[Measure],,DESC)
return
IF(ISFILTERED('Table'[color]),_expand,_unexpand)

Capture.PNG

Saludos

Arrendajo

View solution in original post

4 REPLIES 4
Syndicate_Admin
Administrator
Administrator

Hay @evko ,

Deberá crear otra medida para calcular el valor por tipo.

Por ejemplo:

Measure = SUM('Table'[value])

Measure 2 = CALCULATE(SUM('Table'[value]),ALLEXCEPT('Table','Table'[type]))

Luego use la función ISFILTERED() para obtener un rango diferente.

Measure 3 = 
var _unexpand = RANKX(ALLSELECTED('Table'),[Measure 2],,ASC,Dense)
var _expand = RANKX(ALLEXCEPT('Table','Table'[color]),[Measure],,DESC)
return
IF(ISFILTERED('Table'[color]),_expand,_unexpand)

Capture.PNG

Saludos

Arrendajo

Syndicate_Admin
Administrator
Administrator

@evko La función ISINSCOPE puede ayudarle. La medida debe verse así:

measure=IF(ISINSCOPE([Color]),_descRank,_ascRank)

Hola, lo siento, ¿cuál es _descrank? ¿Es eso también una medida?

Es tu cálculo de rango.

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.