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

¿Cómo crear la tabla P&L del mes actual?

Hola a todos

puedo crear _YTD_REV tabla, utilizando la siguiente expresión :-

_YTD REV = CALCULATE(CALCULATE(GL[AMOUNT],DATESYTD('Date'[Date],"12/31")), GL[1_REV] = "REV")

admin11_0-1619706606559.png

También puedo crear la tabla REV del mes actual, utilizando la siguiente expresión :-

Mes actual - 3 REV =
VAR _Start = EOMONTH ( HOY (), -4 ) + 1
VAR _End = EOMONTH ( _Start, 0 )
devolución
CALCULATE ( [AMOUNT_REV], DATESBETWEEN ( 'Fecha'[Fecha], _Start, _End )

admin11_1-1619706700929.png

Trato de crear la tabla de P&L para la expresión actual del mes 1 :-

Mes actual - 1 =
VAR _Start = EOMONTH ( HOY (), -2 ) + 1
VAR _End = EOMONTH ( _Start, 0 )
devolución
CALCULAR ( 'GL'[IMPORTE], DATESBETWEEN ( 'Fecha'[Fecha], _Start, _End ) )

admin11_2-1619706841093.png

Tengo salida en blanco.

Archivo PBI :-

https://www.dropbox.com/s/2otguqfyq9fxy3p/PBT_V2021_400%20GL_TI.pbix?dl=0

Paul

1 ACCEPTED SOLUTION

@admin11, Mi error olvidar, después de todo(fecha)

Mes actual - 1 =
VAR _Start = EOMONTH ( HOY (), -2 ) + 1
VAR _End = EOMONTH ( _Start, -1 )
devolución
CALCULAR ( 'GL'[AMOUNT], Filtro (all('Date') , 'Date'[Date]<= _Start && 'Date'[Date] >= _End ) )

View solution in original post

4 REPLIES 4
Syndicate_Admin
Administrator
Administrator

@admin11 , Trate de

Mes actual - 1 =
VAR _Start = EOMONTH ( HOY (), -2 ) + 1
VAR _End = EOMONTH ( _Start, -1 )
devolución
CALCULAR ( 'GL'[AMOUNT], Filtro (all('Date') 'Date'[Date]<= _Start & 'Date'[Fecha] >= _End ) )

y

Mes actual =
VAR _Start = EOMONTH ( HOY (), -1 ) + 1
VAR _End = EOMONTH ( _Start, 0 )
devolución
CALCULAR ( 'GL'[AMOUNT], Filtro (all('Date') 'Date'[Date]<= _Start & 'Date'[Fecha] >= _End ) )

@amitchandak

Gracias por compartir, tanto su expresión , me obteto un error a continuación :-

admin11_0-1619736316767.pngadmin11_1-1619737034467.png

@admin11, Mi error olvidar, después de todo(fecha)

Mes actual - 1 =
VAR _Start = EOMONTH ( HOY (), -2 ) + 1
VAR _End = EOMONTH ( _Start, -1 )
devolución
CALCULAR ( 'GL'[AMOUNT], Filtro (all('Date') , 'Date'[Date]<= _Start && 'Date'[Date] >= _End ) )

@amitchandak

Tu expresión funciona bien. Gracias

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.