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
Ritesh_Air
Post Patron
Post Patron

SumX con total

Hola

Estoy tratando de encontrar clientes que compraron más de $500 en cosas.

SumX for More than $500 with summarize = 
SUMX (
    'CPP POS',
    CALCULATE (
        SUM ( 'CPP POS'[Sales Amount] ),
        FILTER (
            SUMMARIZE ( 'CPP POS', RETAILER[Parent Retailer AB Number] ),
            SUM ( 'CPP POS'[Sales Amount] ) > 500
        )
    )
)

Funciona para fila individual, pero me da el mismo resultado del total como si no se aplica el filtro de $500. Abajo:

More than $500.PNG

Cualquier ayuda es apreciada. Gracias.

Ritesh

6 REPLIES 6
amitchandak
Super User
Super User

@Ritesh_Air , Probar como

ventas á sumx(filter(SUMMARIZE ( RETAILER, RETAILER[Parent Retailer AB Number] ,"_1" ,SUM ( 'CPP POS'[Sales Amount] ) ),[_1]>500),[_1])


Recuento de minoristas: countx(filter(SUMMARIZE( RETAILER, RETAILER[Parent Retailer AB Number] ,"_1" ,SUM ( 'CPP POS'[Sales Amount] ) ),[_1]>500),[Parent Retailer AB Number])

@amitchandak @FarhanAhmed

desafortunadamente no. Ambas fórmulas todavía me dan 1.04M. Adición de un nuevo picutre para dar más contexto.

El problema es: el número que está viendo en la pantalla: por ejemplo: $2196 podría estar compuesto por 2 líneas de transacción $1900 y $296, y como se muestra arriba en una de las fórmulas, quiero incluir todo a nivel de cultivador.

Traté de cambiar mi fórmula en resumen a Grower en lugar de Retailer, así, pero todavía obtener la misma respuesta.

Amit Farhan.PNG

FarhanAhmed
Community Champion
Community Champion

Divide tu fórmula en dos y mira los resultados

SumX for More than $500 with summarize = 

    CALCULATE (
        SUM ( 'CPP POS'[Sales Amount] ),
        FILTER (
            SUMMARIZE ( 'CPP POS', RETAILER[Parent Retailer AB Number] ),
            SUM ( 'CPP POS'[Sales Amount] ) > 500
        )
    )

_SUMXformorethan500 = 
SUMX (
    'CPP POS',[SumX for More than $500 with summarize])







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




@FarhanAhmed

Gracias. Lo intenté también, pero el problema es: si tengo 2 partidas para el mismo minorista

que constituye $2196 (que es la suma de $1879 + 317), filtra $317 fila, que quiero incluir.

Por lo tanto, pensé que si lo resumo a nivel de minorista, entonces me dará respuesta con esa granularidad.

Por lo tanto, en el ejemplo siguiente, el total total debe ser poco mayor que $749K pero menos de $1.04M.

More than $500 SumX.PNG

Gracias

Ritesh

Hola @Ritesh_Air

"si tengo 2 artículos de línea para el mismo minorista

que constituye $2196 (que es la suma de $1879 + 317), filtra $317 fila, que quiero incluir."

No entiendo muy bien, ¿dónde está la fila de $317? ¿Te gusta incluirlo o excluirlo? ¿podría proporcionar los datos detallados en lugar de fragmentos? que nos será útil para investigarlo más a fondo.

Puede cargar el pbix ficticio en el onedrive para la empresa y compartir el enlace aquí. por favor, no se olvide de revelar los resultados esperados y eliminar la información confidencial.

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

Prueba Change forumla un poco

SumX for More than $500 with summarize = 

    CALCULATE (
       SUMX(Values( RETAILER[Parent Retailer AB Number] ),     SUM ( 'CPP POS'[Sales Amount] ) 
        )
    )


_SUM = CALCULATE( SUMX('CPP POS',[SumX for More than $500 with summarize]) , FILTER( 'CPP POS',[SumX for More than $500 with summarize]>500))






Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




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.