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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
feralvarez994
Helper II
Helper II

Summarize Table

Hi everyone! I have an issue here, i need to have the Total amount per colaborador in this table by adding the "Total a Liquidar" Measure in the Name of the colaborador Row. I dont know how can i do this, i am attaching the pbi file, every clue is gonna be positive, thank you everyone!

 

PBI File 

 

feralvarez994_0-1659549601501.png

 

1 ACCEPTED SOLUTION
tamerj1
Community Champion
Community Champion

Hi @feralvarez994 
Here is the file with the subtotals fixed. https://www.dropbox.com/t/NTV8GLQ1SWEC4Hm1

A Liquidar = 
SUMX (
    SUMMARIZE ( REPUESTOS, REPUESTOS[Atributo], REPUESTOS[COLABORADOR] ),
    CALCULATE (
    SWITCH(TRUE(), 
        SELECTEDVALUE(REPUESTOS[Atributo], 0) = "Bruto", CALCULATE(SUM(REPUESTOS[Valor]),REPUESTOS[Atributo] = "Bruto"),
        SELECTEDVALUE(REPUESTOS[Atributo], 0) = "Adicional por Unidades sin daños", 
            CALCULATE(SUM(REPUESTOS[Valor]),REPUESTOS[Atributo] = "Adicional por Unidades sin daños"),

        SELECTEDVALUE(REPUESTOS[Atributo], 0) = "Por mant. y mec. Flota De logistica", 
            CALCULATE(SUM(REPUESTOS[Valor]),REPUESTOS[Atributo] = "Por mant. y mec. Flota De logistica"),

        SELECTEDVALUE(REPUESTOS[Atributo], 0) = "Adicional Compra Rep. GM", 
            CALCULATE(SUM(REPUESTOS[Valor]),REPUESTOS[Atributo] = "Adicional Compra Rep. GM"),

        SELECTEDVALUE(REPUESTOS[Atributo], 0) = "Horas Extras", 
            CALCULATE(SUM(REPUESTOS[Valor]),REPUESTOS[Atributo] = "Horas Extras"),

        SELECTEDVALUE(REPUESTOS[Atributo], 0) = "Fact. Rep. Clientes Totales (sin Uspallata)", 
            CALCULATE(SUM(REPUESTOS[Valor]),REPUESTOS[Atributo] = "Fact. Rep. Clientes Totales (sin Uspallata)") * [_Facturado sin Usp],

        SELECTEDVALUE(REPUESTOS[Atributo], 0) = "Fact. Repuestos Clientes Uspallata", 
            CALCULATE(SUM(REPUESTOS[Valor]),REPUESTOS[Atributo] = "Fact. Repuestos Clientes Uspallata") * [_Facturado Uspallata] ,

        SELECTEDVALUE(REPUESTOS[Atributo], 0) = "Fact. Rep. Talleres Totales (sin Uspallata)", 
            CALCULATE(SUM(REPUESTOS[Valor]),REPUESTOS[Atributo] = "Fact. Rep. Talleres Totales (sin Uspallata)") * [_Facturado Sv s/ Usp] ,

        SELECTEDVALUE(REPUESTOS[Atributo], 0) = "Fact. Rep. Talleres Uspallata", 
            CALCULATE(SUM(REPUESTOS[Valor]),REPUESTOS[Atributo] = "Fact. Rep. Talleres Uspallata") * [_Facturado Sv Usp]
            )
    )
)

  

View solution in original post

1 REPLY 1
tamerj1
Community Champion
Community Champion

Hi @feralvarez994 
Here is the file with the subtotals fixed. https://www.dropbox.com/t/NTV8GLQ1SWEC4Hm1

A Liquidar = 
SUMX (
    SUMMARIZE ( REPUESTOS, REPUESTOS[Atributo], REPUESTOS[COLABORADOR] ),
    CALCULATE (
    SWITCH(TRUE(), 
        SELECTEDVALUE(REPUESTOS[Atributo], 0) = "Bruto", CALCULATE(SUM(REPUESTOS[Valor]),REPUESTOS[Atributo] = "Bruto"),
        SELECTEDVALUE(REPUESTOS[Atributo], 0) = "Adicional por Unidades sin daños", 
            CALCULATE(SUM(REPUESTOS[Valor]),REPUESTOS[Atributo] = "Adicional por Unidades sin daños"),

        SELECTEDVALUE(REPUESTOS[Atributo], 0) = "Por mant. y mec. Flota De logistica", 
            CALCULATE(SUM(REPUESTOS[Valor]),REPUESTOS[Atributo] = "Por mant. y mec. Flota De logistica"),

        SELECTEDVALUE(REPUESTOS[Atributo], 0) = "Adicional Compra Rep. GM", 
            CALCULATE(SUM(REPUESTOS[Valor]),REPUESTOS[Atributo] = "Adicional Compra Rep. GM"),

        SELECTEDVALUE(REPUESTOS[Atributo], 0) = "Horas Extras", 
            CALCULATE(SUM(REPUESTOS[Valor]),REPUESTOS[Atributo] = "Horas Extras"),

        SELECTEDVALUE(REPUESTOS[Atributo], 0) = "Fact. Rep. Clientes Totales (sin Uspallata)", 
            CALCULATE(SUM(REPUESTOS[Valor]),REPUESTOS[Atributo] = "Fact. Rep. Clientes Totales (sin Uspallata)") * [_Facturado sin Usp],

        SELECTEDVALUE(REPUESTOS[Atributo], 0) = "Fact. Repuestos Clientes Uspallata", 
            CALCULATE(SUM(REPUESTOS[Valor]),REPUESTOS[Atributo] = "Fact. Repuestos Clientes Uspallata") * [_Facturado Uspallata] ,

        SELECTEDVALUE(REPUESTOS[Atributo], 0) = "Fact. Rep. Talleres Totales (sin Uspallata)", 
            CALCULATE(SUM(REPUESTOS[Valor]),REPUESTOS[Atributo] = "Fact. Rep. Talleres Totales (sin Uspallata)") * [_Facturado Sv s/ Usp] ,

        SELECTEDVALUE(REPUESTOS[Atributo], 0) = "Fact. Rep. Talleres Uspallata", 
            CALCULATE(SUM(REPUESTOS[Valor]),REPUESTOS[Atributo] = "Fact. Rep. Talleres Uspallata") * [_Facturado Sv Usp]
            )
    )
)

  

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.