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
Kcponakala
Frequent Visitor

Las N categorías y productos principales de cada categoría

Hola

Necesito mostrar las principales n categorías y su producción en Matrix with Catg--> Product heirarchy.

Por favor, ayúdame en esto

Las 3 categorías más destacadas
CategoríaProductoVentasrango
Catg1 1003
PROD180
PROD220
Catg2 1502
PROD3100
PROD420
PROD530
Catg3 3001
PROD6100
PROD7200

Gracias

Kalyan

1 ACCEPTED SOLUTION
v-gizhi-msft
Community Support
Community Support

Hola

Por favor, pruebe esta medida:

Measure =
IF (
    ISINSCOPE ( 'Table'[Product] ),
    BLANK (),
    RANKX (
        SUMMARIZE (
            ALLSELECTED ( 'Table' ),
            'Table'[Category],
            "Total", SUM ( 'Table'[Sales] )
        ),
        [Total],
        SUM ( 'Table'[Sales] ),
        DESC,
        DENSE
    )
)

El resultado muestra:

20.PNG

Aquí está mi archivo pbix de prueba:

pbix

Espero que esto ayude.

Saludos

Giotto

View solution in original post

3 REPLIES 3
v-gizhi-msft
Community Support
Community Support

Hola

Por favor, pruebe esta medida:

Measure =
IF (
    ISINSCOPE ( 'Table'[Product] ),
    BLANK (),
    RANKX (
        SUMMARIZE (
            ALLSELECTED ( 'Table' ),
            'Table'[Category],
            "Total", SUM ( 'Table'[Sales] )
        ),
        [Total],
        SUM ( 'Table'[Sales] ),
        DESC,
        DENSE
    )
)

El resultado muestra:

20.PNG

Aquí está mi archivo pbix de prueba:

pbix

Espero que esto ayude.

Saludos

Giotto

amitchandak
Super User
Super User
edhans
Super User
Super User

Si bien es posible, esto sería mucho más fácil para nosotros para ayudar a obtener una copia de los datos de la tabla de origen, no su matriz. De lo contrario, tenemos que volver a crear los datos por usted.

Cómo obtener una buena ayuda rápidamente. Ayúdanos a ayudarte.
Cómo obtener respuesta rápida a su pregunta
Cómo proporcionar datos de ejemplo en el foro de Power BI



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

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.