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

SUMX y ayuda al filtro

Hola, chicos

Estoy tratando de sumar valores, pero no sé usar el sumx en este caso.

(
CALCULAR(
SUM(tabla1[value1]),
FILTRO(tabla1,
FLOOR(max(table1[date1]),0.1)<=[vDate] &&
NOT (tabla1[tipo] IN {"A","B","C"})
)
)

*
CALCULAR(
IF(
MAX(tabla1[value2])=1,1,max(calendario[impuestos])),
FILTRO(tabla1,
FLOOR(max(table1[date2]),0.1)<=[vDate] &&
NOT (tabla1[tipo] IN {"A","B","C"})
)
)
)
el valor2 es 0,00 y 1,00

El valor de resultado esperado es de 3297089,00
sumx.png

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

@twister8889 , Debe usar algún grupo desde el objeto visual (decir columna de grupo)

una medida como

sumx(Valores(tabla1[Grupo])
(
CALCULAR(
SUM(tabla1[value1]),
FILTRO(tabla1,
FLOOR(max(table1[date1]),0.1)<=[vDate] &&
NOT (tabla1[tipo] IN {"A","B","C"})
)
)

*
CALCULAR(
IF(
MAX(tabla1[value2])=1,1,max(calendario[impuestos])),
FILTRO(tabla1,
FLOOR(max(table1[date2]),0.1)<=[vDate] &&
NOT (tabla1[tipo] IN {"A","B","C"})
)
)
))

También compruebe https://www.youtube.com/watch?v=ufHOOLdi_jk

View solution in original post

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

Hay @twister8889,

Por favor, utilice algo como:

measure1 =
(
    CALCULATE (
        SUM ( table1[value1] ),
        FILTER (
            table1,
            FLOOR ( table1[date1], 0.1 ) <= [vDate]
                && NOT ( table1[type] IN { "A", "B", "C" } )
        )
    )
        * CALCULATE (
            IF ( MAX ( table1[value2] ) = 1, 1, MAX ( calendar[tax] ) ),
            FILTER (
                table1,
                FLOOR ( table1[date2], 0.1 ) <= [vDate]
                    && NOT ( table1[type] IN { "A", "B", "C" } )
            )
        )
)

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

Saludos

Dedmon Dai

Syndicate_Admin
Administrator
Administrator

@twister8889 , Debe usar algún grupo desde el objeto visual (decir columna de grupo)

una medida como

sumx(Valores(tabla1[Grupo])
(
CALCULAR(
SUM(tabla1[value1]),
FILTRO(tabla1,
FLOOR(max(table1[date1]),0.1)<=[vDate] &&
NOT (tabla1[tipo] IN {"A","B","C"})
)
)

*
CALCULAR(
IF(
MAX(tabla1[value2])=1,1,max(calendario[impuestos])),
FILTRO(tabla1,
FLOOR(max(table1[date2]),0.1)<=[vDate] &&
NOT (tabla1[tipo] IN {"A","B","C"})
)
)
))

También compruebe https://www.youtube.com/watch?v=ufHOOLdi_jk

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.