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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors