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

Cómo hacer que una cortadora externa funcione sin incluirla en la función ALLEXCEPT

Hola

Como se muestra en la figura a continuación, estoy ignorando el filtro de categoría3 en la función ALLEXCEPT, pero quiero que la segmentación de datos externa de la categoría3 funcione.

Sin embargo, para aplicar una cortadora externa, es necesario poner categoría3 en la función ALLEXCEPT.

Entonces el cálculo no funcionará. Quiero saber la solución.

Gracias

tabla de destino

f_999_2-1642097602741.png
resultado del cálculo
f_999_3-1642097876470.png

medir fomula

not_slicer =
var selectedfilter1 = SELECTEDVALUE('table'[category1])
var table1 = ADDCOLUMNS('table',"sum_value",MAXX(FILTER('table','table'[category1]=selectedfilter1)
,CALCULATE(SUM('table'[value]),ALLEXCEPT('table','table'[category1],'table'[category2]))))
RETURN
MAXX(table1,[sum_value])
agregar categoría3
not "E""H" =
var selectedfilter1 = SELECTEDVALUE('table'[category1])
var table1 = ADDCOLUMNS('table',"sum_value",MAXX(FILTER('table','table'[category1]=selectedfilter1)
,CALCULATE(SUM('table'[value]),ALLEXCEPT('table','table'[category1],'table'[category2],'table'[category3]))))
RETURN
MAXX(table1,[sum_value])

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

Creo que esto debería funcionar:

MAXX (
    ADDCOLUMNS (
        SUMMARIZE ( 'table', 'table'[category1], 'table'[category2] ),
        "SUM_value", CALCULATE ( SUM ( 'table'[value] ) )
    ),
    [SUM_value]
)

View solution in original post

5 REPLIES 5
Syndicate_Admin
Administrator
Administrator

Creo que esto debería funcionar:

MAXX (
    ADDCOLUMNS (
        SUMMARIZE ( 'table', 'table'[category1], 'table'[category2] ),
        "SUM_value", CALCULATE ( SUM ( 'table'[value] ) )
    ),
    [SUM_value]
)

@AlexisOlson

Hola y gracias por responder a mi pregunta. Tengo preguntas adicionales.

¿Es posible hacer lo mismo con la función ALLEXCEPT?
Tengo una razón para usarlo.

Sería útil si pudieras responder a esta pregunta también.
Gracias.

No estoy seguro de entender la pregunta. Podrías poner ALLEXCEPT dentro del CALCULATE en el DAX que te di pero sin saber por qué quieres usarlo, no tengo forma de saber si se comportará como pretendes o no.

¿@AlexisOlson

gracias por su respuesta.
Lamento la intención poco clara. Volví a preguntar qué quería hacer.
Me encantaría que pudiera responder a esta pregunta.

https://community.powerbi.com/t5/Desktop/How-to-work-an-external-slicer-without-including-it-in-the/...

Gracias

Hola @AlexisOlson

Esta es la solución que estoy buscando. Estoy muy contento.

¡Muchas gracias!

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.