The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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
Solved! Go to Solution.
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:
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.
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:
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.
@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?
En este caso la columna de YTD debería reflejar el total del año (es decir, hasta 08/04/2021)
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.
User | Count |
---|---|
137 | |
108 | |
80 | |
69 | |
59 |
User | Count |
---|---|
258 | |
128 | |
116 | |
100 | |
80 |