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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Syndicate_Admin
Administrator
Administrator

comparar KPI con el último fin de año

Hola

Quiero comparar el KPI del período dado con el año pasado - fin de año. Entonces, por ejemplo, en la cortadora obtuve mayo de 2022, me muestra digamos Cantidad de ventas y quiero compararlo con el último año (por lo que mayo de 2021) pero cambió a diciembre de 2021

Supongo que va a ser una mezcla de funciones dateadd y endofyear? ¿Alguien puede ayudarme con eso?

1 ACCEPTED SOLUTION

Bien, mi solución es:

DÓNDE _endofyeardate = MAXX('Calendario',FIN DE AÑO(dateadd('Calendario'[Fecha],-12,MES)))
DEVOLUCIÓN
Calcular([Medida], 'Calendario'[Fecha] = _endofyeardate)

View solution in original post

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

@Pbiuserr , remisión de estas medidas basadas en el día de hoy

con TI, es necesario seleccionar la fecha

último año último mes = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1*month(Today()),MONTH)))

No es necesario seleccionar la fecha

Este mes hoy =
var _min = eomonth(today(),-1)+1
var _max = eomonth(today(),0)
return CALCULATE([Net], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))

Último mes hoy =
var _min = eomonth(hoy(),-2)+1
var _max = eomonth(today(),-1)
return CALCULATE([Net], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))

Mismo mes del año pasado hoy =
var _min = eomonth(today(),-13)+1
var _max = eomonth(today(),-12)
return CALCULATE([Net], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))

Último mes Año pasado Hoy =
var _min = eomonth(today(),-1*month(Today())-1)+1
var _max = eomonth(today(),-1*month(Today()))
return CALCULATE([Net], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))

No los entiendo

Quiero comparar el valor de la selección de la segmentación de datos del usuario (que sea abril de 2022) con diciembre de 2021, luego el usuario selecciona junio de 2021 y compara el valor con diciembre de 2020

¿Esta medida resuelve eso?

Bien, mi solución es:

DÓNDE _endofyeardate = MAXX('Calendario',FIN DE AÑO(dateadd('Calendario'[Fecha],-12,MES)))
DEVOLUCIÓN
Calcular([Medida], 'Calendario'[Fecha] = _endofyeardate)

Helpful resources

Announcements
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.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.