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álculo de DAX basado en la fila de la tabla

Hola

Quiero crear un DAX que ejecute una expresión basada en las filas de la tabla. Mi medida es

Sobre las especificaciones : CALCULATE( COUNTROWS( FILTER((Infinity), [Value] > 3.6)) , Infinity[Test] á "Shoulder Weight") + CALCULATE( COUNTROWS( FILTER(Infinity), [Value] > 1.4)) , Infinity[Test] á "Body Weight")
Solo el peso del hombro y el peso corporal deben tener valores al evaluar esta medida.

PBI 1.png

Gracias

5 REPLIES 5
mahoneypat
Employee
Employee

Por favor, pruebe esta medida en su lugar. El filtro de cálculo en Infinity[Test] está sobrescribiendo el filtro proporcionado por la fila en el objeto visual de la tabla.

Sobre las especificaciones: CALCULATE( COUNTROWS(Infinity), Filter(Value(Infinity[Value]), Infinity[Value] > 3.6), Filter(Infinity[Test]), Infinity[Test] á "Shoulder Weight") + CALCULATE( COUNTROWS(Infinity), Filter(Infinity[Value]), Infinity[Value] > 1.4), Filter(Values(Infinity[Test]), Infinity[Test], Infinity

También puede utilizar KEEPFILTERS().

Si esto funciona para usted, márquelo como solución. Los elogios también son apreciados. Por favor, avísame si no.

saludos

palmadita





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

Este es el error que obtengo al ajustar la medida en KeepFilters

La función KEEPFILTERS solo se puede utilizar como argumento de filtro de nivel superior de CALCULATE y CALCULATETABLE o con un argumento de tabla de una función que realiza un examen de tabla.

Consulte esta publicación para obtener más información sobre KEEPFILTERS().

https://www.sqlbi.com/articles/using-keepfilters-in-dax/

Uno de los ejemplos de ese artículo muestra la sintaxis como se muestra a continuación. ¿Así es como lo usaste?

OnlyRed :
CALCULAR (
[Importe de ventas],
KEEPFILTERS ( Productos[Color] á "Rojo" )

Si esto funciona para usted, márquelo como solución. Los elogios también son apreciados. Por favor, avísame si no.

saludos

palmadita





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


az38
Community Champion
Community Champion

Hola @Bretstu

tratar más fácil

Over Spec = 
CALCULATE( COUNTROWS(Infinity), Infinity[Value] > 3.6, Infinity[Test] = "Shoulder Weight")
 + 
CALCULATE( COUNTROWS(Infinity), Infinity[Value] > 1.4, Infinity[Test] = "Body Weight")

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

El resultado utilizando esa medida esPBI 1.png

Necesito la columna over para calcular en función de la columna de prueba

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.