Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Syndicate_Admin
Administrator
Administrator

YTD regresa en blanco en el visual de la tarjeta

Hola - Estoy usando la medida QTD a continuación y funciona bien.

Sin embargo, la medida YTD solo devuelve un valor en blanco. Sé que hay varias maneras de calcular YTD, pero estoy tratando de estandarizar mis fórmulas y me gusta esta fórmula porque oculta fechas futuras sin valores. Cualquier idea de por qué el YTD está regresando en blanco... y cómo arreglarlo, pero manteniendo esta estructura de fórmula general.

Órdenes YTD = CALCULATE(SUM('Orders 2'[Precio neto]), FILTER('Date Table', 'Date Table'[Date' >= DATE(YEAR(TODAY()), YEAR(TODAY()), 01)), FILTER('Date Table', 'Date Table'[Date Table' <= TODAY()))
Órdenes QTD = CALCULATE(SUM('Orders 2'[Precio neto]), FILTER('Date Table', 'Date Table'[Date Table' >= DATE(YEAR(TODAY()), QUARTER(TODAY()), 01)), FILTER('Date Table', 'Date Table'[Date Table' <= TODAY()))
1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

No @texmexdragon,

Puede utilizar las dos medidas siguientes:

YTD Orders  = CALCULATE(SUM('Orders 2'[Net Price]), FILTER('Date Table', 'Date Table'[Date] >= DATE(YEAR(TODAY()), MONTH(TODAY()), 1)), FILTER('Date Table', 'Date Table'[Date] <= TODAY()))

QTD Orders  = CALCULATE(SUM('Orders 2'[Net Price]), FILTER('Date Table', 'Date Table'[Date] >= DATE ( YEAR (TODAY()), ROUNDUP(DIVIDE(MONTH(TODAY()),3 ),0 ) *3 -2, 1)), FILTER('Date Table', 'Date Table'[Date] <= TODAY()))

Si esta publicación ayuda, considere Aceptarla como la solución para ayudar a los demás miembros a encontrarla más rápidamente.

Saludos

Dedmon Dai

View solution in original post

5 REPLIES 5
Syndicate_Admin
Administrator
Administrator

No @texmexdragon,

Puede utilizar las dos medidas siguientes:

YTD Orders  = CALCULATE(SUM('Orders 2'[Net Price]), FILTER('Date Table', 'Date Table'[Date] >= DATE(YEAR(TODAY()), MONTH(TODAY()), 1)), FILTER('Date Table', 'Date Table'[Date] <= TODAY()))

QTD Orders  = CALCULATE(SUM('Orders 2'[Net Price]), FILTER('Date Table', 'Date Table'[Date] >= DATE ( YEAR (TODAY()), ROUNDUP(DIVIDE(MONTH(TODAY()),3 ),0 ) *3 -2, 1)), FILTER('Date Table', 'Date Table'[Date] <= TODAY()))

Si esta publicación ayuda, considere Aceptarla como la solución para ayudar a los demás miembros a encontrarla más rápidamente.

Saludos

Dedmon Dai

@v-deddai1-msft , ¿cómo representaría uno MTD?

Syndicate_Admin
Administrator
Administrator

Puede crear su medida como aquí.

stevedep_0-1613749444735.png

@stevedep Gracias Steve. Lo intenté y por alguna razón todavía vuelve en blanco. Pero veo que en el editor de DAX lo tienes para trabajar para ti. No estoy seguro de por qué no está en mi conjunto de datos. Por supuesto, puedo usar una suma de medida total que funciona muy bien. Pero mi intención original era tratar de mantenerme con la misma estructura de fórmula que estoy usando en las medidas mtd y QTD como hice referencia anteriormente. Pensé que al reemplazar "Quarter" por "Year" funcionaría, pero no lo hace.

Syndicate_Admin
Administrator
Administrator

@texmexdragon , Trate de utilizar la inteligencia del tiempo

Ventas de QTD = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(('Date'[Date])))

Ventas YTD = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))

YTD QTY forzado=
var _max = hoy()
devolución
if(max('Date'[Date])<=_max, calculate(Sum('order'[Qty]),DATESYTD('Date'[Date])), blank())
O
calculate(Sum('order'[Qty]),DATESYTD('Date'[Date]),filter('Date','Date'[Date]<=_max))
calculate(TOTALYTD(Sum('order'[Qty]),'Date'[Date]),filter('Date','Date'[Date]<=_max))

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.

Top Kudoed Authors