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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors