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

Rendimiento de correr en total por ranking

Hola a todos

Creo una medida Running in total by [Total Sales] ranking, con el fin de conocer a los principales clientes por % de las ventas.

tannhq_0-1664763096812.png

Pero el rendimiento es muy lento. ¿Alguien puede tener la idea o la solución para esto?

Hay 2 medidas que estoy usando:

Customer RANK =
IF (
    [Total Sales] > 0,
    IF (
        ISINSCOPE ( Customers[Code-Customer] ),
        RANKX (
            FILTER (
                ALLSELECTED ( Customers[Code-Customer] ),
                [Total Sales] > 0
            ),
            [Total Sales]
        )
    )
)
Total Sales Running In Total = 
VAR CurrentRank = [Customer RANK]
VAR SummaryCustomers =
    CALCULATETABLE (
        VALUES ( Customers[Code-Customer] ),
        FILTER ( ALLSELECTED ( Customers[Code-Customer] ), [Total Sales] > 0 )
    )
VAR CustomerAndRank =
    ADDCOLUMNS (
        SummaryCustomers,
        "@Sales", [Total Sales],
        "@Rank", [Customer RANK]
    )
VAR Result =
    SUMX ( FILTER ( CustomerAndRank, [@Rank] <= CurrentRank ), [@Sales] )
RETURN
    Result

Muchas gracias.

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

@tannhq , Prueba como

Rango del cliente =
RANKX (
FILTRO (
ALLSELECTED ( Clientes[Código-Cliente] ),
[Ventas totales] > 0
),
[Ventas totales]
)


Ventas totales en total =
VAR CurrentRank = [RANGO DEL CLIENTE]
VAR CustomerAndRank =
ADDCOLUMNS (filter( Sumamrize(Customers, Customers[Code-Customer] ),[Total Sales] > 0 )
ResumenCuotadores,
"@Sales", [Ventas totales],
"@Rank", [Rango del cliente]
)
Resultado VAR =
SUMX ( FILTER ( CustomerAndRank, [@Rank] <= CurrentRank ), [@Sales] )
DEVOLUCIÓN
Resultado

Consulte también

https://exceleratorbi.com.au/pareto-analysis-in-power-bi/

Gracias @amitchandak ,

Su medida devuelve el mismo número de ventas totales.

Intento agregar ALL (o ALLSELECTED) yel rendimiento sigue siendo muy lento.

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.