AnsweredAssumed Answered

Using an "if function" within an aggregate function.

Question asked by kirvis on Nov 23, 2009
Latest reply on Nov 24, 2009 by kirvis


Using an "if function" within an aggregate function.


Hi all,


I would like to know if it is possible to conditionalize the Sum function. I have a table with a lot of processes, which have a category tag. I would like to be able to summarize values only from rows which have a certain category tag. Because the Sum calculation will be in another table, it is not possible to use subsummary values.


It would have to be something like:



Sum ( 

If (

connect_table_processes::process category = "production and packaging" ; 

connect_table_processes::GHG ; 




In words: Summarize GHG values from table connect_table_processes from rows which have value "production and packaging" in process category.


I have tried the calculation below first, but that does not work unfortunately. 


If (

connect_table_processes::process category = "wholesale" ; 

Sum ( connect_table_processes::GHG ) ; 


Is this possible?