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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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