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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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
Super User
Super User

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
Super User
Super User

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.