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
Paulyeo11
Impactful Individual
Impactful Individual

¿Cómo crear una expresión para la cantidad continua a partir de la siguiente base de 12 meses al final del mes?

Hola a todos

La siguiente expresión está rodando 12 meses de importe de ventas base en NO fin de mes de trabajo multa :-

_LAST12 : CALCULATE(sum(SALES[sales]),DATESINPERIOD('Date'[Date],MAX(SALES[date]),-12,MONTH))

A continuación de la expresión de 12 meses de importe de ventas base en fin de mes de trabajo multa :-

_LAST12_month final de la _LAST12_month
VAR _lastdate á MAX('Fecha'[Fecha])
devolución
CALCULATE(sum(SALES[sales]),DATESINPERIOD('Date'[Date],_lastdate,-12,MONTH))
A continuación se muestra la rotación de 12 meses de cantidad de ventas a partir de los próximos 12 meses NO fin de mes de trabajo multa :-
_LAST24: CALCULATE(SUM(SALES[sales]), DATESINPERIOD('Date'[Date], maxx('Date', DATEADD('Date'[Date],-12,MONTH)),-12, MONTH))

Cómo crear la expresión rolling 12 meses de cantidad de ventas a partir de la siguiente base de 12 meses en el fin de mes de trabajo multa :-

_LAST24_month final de la _LAST24_month
VAR _lastdate á MAX('Fecha'[Fecha])
devolución
CALCULATE(SUM(SALES[sales]), DATESINPERIOD('Date'[Date], maxx('Date', DATEADD('Date'[Date],-12,MONTH)),-12, MONTH))
¿Cómo hacer que el código de color azul anterior funcione?
Paul
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Paulyeo11 , Probar como

_LAST24_month final de la _LAST24_month
VAR _lastdate á MAX('Fecha'[Fecha])
var _min á date(year(_lastdate), month(_lastdate)-12, day(_lastdate))
usar var _min á eomonth(date(year(_lastdate), month(_lastdate)-12, day(_lastdate)) ,0)
devolución
CALCULATE(SUM(SALES[sales]), DATESINPERIOD('Date'[Date], _min,-12, MONTH))

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Paulyeo11 , Probar como

_LAST24_month final de la _LAST24_month
VAR _lastdate á MAX('Fecha'[Fecha])
var _min á date(year(_lastdate), month(_lastdate)-12, day(_lastdate))
usar var _min á eomonth(date(year(_lastdate), month(_lastdate)-12, day(_lastdate)) ,0)
devolución
CALCULATE(SUM(SALES[sales]), DATESINPERIOD('Date'[Date], _min,-12, MONTH))

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.