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
Icad
Frequent Visitor

Muchos REMOVEFILTERS. ¿Hay una manera más corta?

Hola expertos de DAX,

Esa es mi primera pregunta aquí 🙂

Tengo una medida con muchos REMOVEFILTERS:

Válvulas de almacenamiento ?

CALCULATE(SUM(pbiFact[Sale]),
REMOVEFILTERS('pbiDepartments'[Departamento]),
REMOVEFILTERS('pbiSubCategories'[SubCategoría]),
REMOVEFILTERS('pbiCategories'[Categoría]),
REMOVEFILTERS('pbiProducts'[Producto])
)

Que utilizo en otra medida:

% de Las Tiendas Vals ?
DIVIDE( [Vals],
CALCULATE ( [Store Vals] ) ,
BLANCO()
)
¿Hay una forma más corta de escribir la primera medida?
Gracias. Icad.
6 REPLIES 6
vanessafvg
Super User
Super User

puedo preguntar primero con qué realmente tratas de terminar. ¿Sólo desea sumar el filtro de valor libre? es decir, ¿quieres que todos se dividan?

Creo que lo que buscas es usar la función all.

% de Las Tiendas Vals ?
Dividir (
[Vals],
Calcular ( Suma (pbiFact[Venta]), todo ([pbiFact]) ),
Blanco ()
)

este video podría ayudar.

https://www.youtube.com/watch?v=AIk1vPM-u2I





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Vanessa, gracias por tu rápida respuesta.

TODOS eliminan todos los filtros. Necesito mantener los filtros (Año,..., YTD)

y simplemente elimine los filtros de jerarquía (como Dept, Cat, SubCat, Product).

Pensé que había algo como:

Calcular ( Suma (pbiFact[Venta]), mantenga el contexto de fila y todos los filtros de fechas excepto los filtros de jerarquía )

Gracias. Icad.

Hola @Icad ,

Como sugiere vanessafvg, puedes probar la función de ALLEXCEPT. Aquí están los blogs a los que podría hacer referencia para obtener más información.

REMOVEFILTERS() a DAX

https://www.sqlbi.com/articles/managing-all-functions-in-dax-all-allselected-allnoblankrow-allexcept...

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

CST, gracias por su ayuda 🙂

Lo intentaré de nuevo más tarde y publicaré aquí. Icad.

a continuación, puede utilizar allexcept()

https://docs.microsoft.com/en-us/dax/allexcept-function-dax





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Vanessa, lo siento por el retraso (malos tiempos).

ALLEXCEPT no funciona para mí, tal vez porque estoy demasiado cansado.

Lo intentaré de nuevo más tarde y te lo haré saber.

Gracias de nuevo por su valioso tiempo. Icad

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.