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
OscarSuarez10
Helper III
Helper III

Acumulated production

Hello I want to calculate the acumulated production per year, task and ID, like in the following table, can you help me?

 

IDTASK YEAR PRODUCTION
Accumulated production
011-80-80
01210020
013110130
014105235
121-50-50
122-60-110
123-80-190
124100-90
125200110
126300410
231-89-89
232-74-163
233-50-213
234-20-233
235500267
5 REPLIES 5
Anonymous
Not applicable

Hi @OscarSuarez10 ,

 

try the following expression:

 

 
var var_year = SELECTEDVALUE(table_name[YEAR])
return
CALCULATE(
sum(table_name[PRODUCTION]) ;
Hoja1[YEAR]<= var_year
)
 
I think it is enough for your requeriment, good luck 😉

Hello @Anonymous  I applied the formula in this way:

 

ACUMULATED PRODUCTION =

var var_year = SELECTEDVALUE('pruebas'[YEAR])

return

CALCULATE(

sum('pruebas'[PRODUCTION]) ;

'pruebas'[YEAR]<= var_year

)

 

But i got nothin in the column:

 

acmulated production.JPG

Doy you know what am i doing wrong?

Anonymous
Not applicable

Hi @OscarSuarez10 ,

 

I don't know what could happen. Check out the screenshot I attached, it may helps you:

Captura.PNG

Anonymous
Not applicable

Hi,

modify below:

 

acumulated production =
CALCULATE (
    sum("table name"[PRODUCTION]),
    FILTER (
        ALL ("TABLE NAME"[YEAR]),
        "TABLE NAME"[YEAR] <= MAX ( "TABLE NAME"[YEAR] )
    )
)
 
thanks
 
daniel

Hello @Anonymous , thanks for your help, when I use this formula I get the same values, is not adding the previus one:

 

YEAR PRODUCTION
Accumulated production
1-80-80
2100100
3110110
4105105
1-50-50
2-60-60
3-80-80
4100100
5200200
6300300
1-89-89
2-74-74
3-50-50
4-20-20
5500500

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.

Top Solution Authors