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
Anonymous
Not applicable

cómo hacer una suma condicional en una tabla resumida filtrada

Hola

He hecho una tabla resumida usando el siguiente DAX:

Tabla de resumen (Summary Table)
FILTRO(
SUMMARIZE('TransXML Children Level','TransXML Children Level'[SBatchName],'TransXML Children Level'[FileName],'TransXML Children Level'[LockBox],'TransXML Children Level'[ResultStatus],'TransXML Children Level'[Batch Status],'TransXML Children Level'[Transaction Date].[ Date],'TransXML Children Level'[Period],'TransXML Children Level'[Account],'TransXML Children Level'[NbInvoiceBAI],"number of invoices Posted",DISTINCTCOUNTNOBLANK('TransXML Children Level'[CorInvoice]),"TotalAmount",sum('TransXML Children Level'[Amount])),'TransXML Children Level'[ResultStatus]" 'Nivel de hijos TransXML'[Estado del lote]-"A" && 'Nivel de hijos TransXML'[Cuenta]-"100" )
Now my needs has evoluated and I would like to get the number of none blank record when 'Nivel de elementos secundarios transXML'[Estado del lote]-"A", el número de facturas registradas y 'Nivel de elementos secundarios transXML'[Estado del lote]-"N" , el número de ninguna factura registrada Manteniendo la otra condición en la tabla de resumen como:

'Nivel de niños TransXML'[ResultStatus]"s" && 'Nivel de hijos TransXML'[Cuenta]"100"

Así que pensé que mi guión podría parecerse a continuación



Tabla de resumen (Summary Table)
FILTRO(
SUMMARIZE('TransXML Children Level','TransXML Children Level'[SBatchName],'TransXML Children Level'[FileName],'TransXML Children Level'[LockBox],'TransXML Children Level'[ResultStatus],'TransXML Children Level'[Batch Status],'TransXML Children Level'[Transaction Date].[ Fecha],'Nivel de niños TransXML'[Período],'Nivel de elementos secundarios TransXML'[Cuenta],'Nivel de elementos secundarios TransXML'[NbInvoiceBAI],"número de facturas publicadas",DISTINCTCOUNTNOBLANK('Nivel de niños TransXML'[CorInvoice]) con el estado del lote "A" ,"número de números de las facturas none Posted",DISTINCTCOUNTNOBLANK('TransXML Children Level'[CorInvoice]) con el estado del lote "N","TotalAmount",sum('Nivel de niños TransXML'[Cantidad])),'Nivel de niños TransXML'[ResultStatus]"s" && 'Nivel de niños TransXML'[Cuenta]"100" )

¿Cómo podemos hacer una suma condicional (Estado de lote "A" o Estado de lote "N") mientras filtramos el resto de la tabla resumida utilizando esas dos codiciones: 'Nivel de niños TransXML'[ResultStatus]"s" && 'Nivel de niños TransXML'[Cuenta]-"100"






1 REPLY 1
v-alq-msft
Community Support
Community Support

Hola, @alepage

Por favor, intente crear una tabla calculada como se muestra a continuación para ver si funciona.

Summary Table =
FILTER (
    SUMMARIZE (
        'TransXML Children Level',
        'TransXML Children Level'[SBatchName],
        'TransXML Children Level'[FileName],
        'TransXML Children Level'[LockBox],
        'TransXML Children Level'[ResultStatus],
        'TransXML Children Level'[Batch Status],
        'TransXML Children Level'[Transaction Date].[Date],
        'TransXML Children Level'[Period],
        'TransXML Children Level'[Account],
        'TransXML Children Level'[NbInvoiceBAI],
        "number of invoices Posted", CALCULATE (
            DISTINCTCOUNT ( 'TransXML Children Level'[CorInvoice] ),
            FILTER (
                'TransXML Children Level',
                'TransXML Children Level'[CorInvoice] <> BLANK ()
                    && 'TransXML Children Level'[Batch Status] = "A"
            )
        ),
        "number of invoices  none Posted", CALCULATE (
            DISTINCTCOUNT ( 'TransXML Children Level'[CorInvoice] ),
            FILTER (
                'TransXML Children Level',
                'TransXML Children Level'[CorInvoice] <> BLANK ()
                    && 'TransXML Children Level'[Batch Status] = "N"
            )
        ),
        "TotalAmount", SUM ( 'TransXML Children Level'[Amount] )
    ),
    'TransXML Children Level'[ResultStatus] = "s"
        && 'TransXML Children Level'[Account] = "100"
)

Saludos

Allan

Si este post ayuda,entonces considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

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.