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

Aplicación de múltiples filtros a TOTALYTD

Hola a todos

Estoy tratando de aplicar dos filtros a una medida TOTALYTD que viene con el siguiente mensaje de error:

"La expresión True/False no especifica una columna. Cada expresión True/False utilizada como expresión de filtro de tabla debe hacer referencia exactamente a una columna."

El DAX que he intentado aplicar es el siguiente:

Total de pedido YTD FY á TOTALYTD(DISTINCTCOUNT('Order Details'[nOrderId]), Dates[Date],"30/06", 'Order Details'[Ventas Incluyen o Excluir] EN "Sí"))

Estaría muy agradecido de cualquier ayuda en este

1 ACCEPTED SOLUTION
ibarrau
Super User
Super User

Creo que totalytd no te permitirá agregar una condición que responda verdadero/falso. Está esperando una instrucción FILTER. Puede agregar un FILTRO a la tabla con la condición IN o probar DATESYTD dentro calcular de la siguiente manera:

CALCULATE(
	DISTINCTCOUNT('Order Details'[nOrderId])
	, DATESYTD ( Dates[Date] , "30/06" )
        , 'Order Details'[Sales Include or Exclude] = "Yes"
)

Espero que esto ayude,


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

Happy to help!

LaDataWeb Blog

View solution in original post

3 REPLIES 3
ibarrau
Super User
Super User

Creo que totalytd no te permitirá agregar una condición que responda verdadero/falso. Está esperando una instrucción FILTER. Puede agregar un FILTRO a la tabla con la condición IN o probar DATESYTD dentro calcular de la siguiente manera:

CALCULATE(
	DISTINCTCOUNT('Order Details'[nOrderId])
	, DATESYTD ( Dates[Date] , "30/06" )
        , 'Order Details'[Sales Include or Exclude] = "Yes"
)

Espero que esto ayude,


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

Happy to help!

LaDataWeb Blog

Anonymous
Not applicable

Hola @ibarrau,

Esto funciona perfectamente gracias 😊

Anonymous
Not applicable

Hola, no conozco muy bien la función TOTALYTD(). Pero para CALCULATE uno obtiene el mismo problema. La solución es, a continuación, cambiar: 'Detalles del pedido'[Ventas IE] EN "YES" -> FILTER(ALL('Detalles del pedido'), 'Detalles del pedido'[Detalles de ventas] EN "YES")

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.