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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
fmunoz
Frequent Visitor

Ventas acumuladas que no tengan en cuenta el filtro de fechas

Estoy creando una tabla que contiene las Ventas y Ventas YTD (acumuladas). Sobre esta tabla estoy aplicando un filtro de fechas (desde-hasta)

Es posible que dentro de la misma tabla para el dato Ventas YTD no aplique el filtro de fechas, es decir, que siempre me calcule las ventas acumuladas del año sin tener en el filtro de fechas.

 

Gracias

1 ACCEPTED SOLUTION
v-cazheng-msft
Community Support
Community Support

Hi @fmunoz 

You can create a Calculated column or Measure.

 

 

YTD column =

var today = TODAY()

return CALCULATE(SUM('Table'[Importe Ventas]), FILTER(ALL('Table'),YEAR('Table'[Fecha]) =YEAR(Today()) && DAY('Table'[Fecha]) <= today) )

 

 

The result looks like this:

v-cazheng-msft_0-1617950870522.png

 

For more details, you can refer the attached pbix file.

 

Best Regards

Caiyun Zheng

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

4 REPLIES 4
v-cazheng-msft
Community Support
Community Support

Hi @fmunoz 

Is your problem solved?

 

Best Regards

Caiyun Zheng

v-cazheng-msft
Community Support
Community Support

Hi @fmunoz 

You can create a Calculated column or Measure.

 

 

YTD column =

var today = TODAY()

return CALCULATE(SUM('Table'[Importe Ventas]), FILTER(ALL('Table'),YEAR('Table'[Fecha]) =YEAR(Today()) && DAY('Table'[Fecha]) <= today) )

 

 

The result looks like this:

v-cazheng-msft_0-1617950870522.png

 

For more details, you can refer the attached pbix file.

 

Best Regards

Caiyun Zheng

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

amitchandak
Super User
Super User

@fmunoz , if you have chosen a date

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

 

without selecting a date

 

YTD=
var _min = date(year(today()),1,1)
var _day = today()
return
CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Year] =year(Today()) && 'Date'[Day of Year] <= _day) )

 

if this does not help

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Hola, 

Muchas gracias por la ayuda, pero no resuelve mi problema...

Tengo un filtro de fechas aplicado para todas las páginas del informe.

¿Es posible calcular el total acumulado del año actual sin tener en cuenta la fecha del filtro?

 

fmunoz_0-1617873264649.png

En este caso la columna de YTD debería reflejar el total del año (es decir, hasta 08/04/2021)

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.