cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
DPalaciosW
Regular Visitor

Suma acumulada

Hola, vengo teniendo un problema les comento. 

 

Tengo esta tabla que es un forecast, entonces yo quisiera tener una medida que me sume el acumulado mes a mes de la columna cantidad pero que detenga la suma en el mes anterior cerrado (es decir si hoy es 5 de mayo, me sume hasta el 30 de abril y asi sea 15 de mayo me siga sumando hasta el 30 de abril y recien cuando sea junio, me sume hasta el 31 de mayo), no se si se a posible. 


Gracias  

DPalaciosW_0-1683279138853.png

 

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

@Syndicate_Admin ,

Basándome en su descripción, he creado una muestra simple:

vjianbolimsft_0-1683513505507.png

Por favor, intente:

Cumulative sum = 
var _a = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),[Date]<=EOMONTH(MAX('Table'[Date]),0)))
var _b = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),[Date]<=EOMONTH(MAX('Table'[Date]),-1)))
return IF(MONTH(MAX('Table'[Date]))=MONTH(TODAY()),_b,_a)

Resultado final:

vjianbolimsft_1-1683513842778.png

Saludos

Jianbo Li

Si esta publicación ayuda, considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors