Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
sunil2288
Creator III
Creator III

Doubt in sum( ) function

Hi Everybody,

I have doubt on sum( ) function.below there is an expression written. in this exp if "#_ClaimsAmount" is not available for @_HFM_Code_Group='P0300000' then it should show the sum of "sum(#_NetSalesValue)+sum(#_Amount_Fixed_Cost)" for @_HFM_Code_Group='P0300000' .

but it is not showing like that instead it shows nothing...

=Sum({$<@_HFM_Code_Group='P0300000'>}(sum(#_ClaimsAmount)+sum(#_NetSalesValue)+sum(#_Amount_Fixed_Cost)))

Please resolve this problem..

waiting for response

Thanks,

Sunil

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

I have no clue what you're trying to do. However, in set analysis, the literal value needs to be in curly brackets, like this:

={'P0300000'}

You also can't do a sum() inside of a sum(), or at least not without an aggr(), which probably isn't what you're trying to do anyway.

View solution in original post

4 Replies
Not applicable

=Sum({$<@_HFM_Code_Group='P0300000'> -1}

I think, not sure though.

brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi,

there is a mistake between ...>}(sum(... - waht does that mean?

=Sum({$<@_HFM_Code_Group='P0300000'>}(sum(#_ClaimsAmount)+sum(#_NetSalesValue)+sum(#_Amount_Fixed_Cost)))

johnw
Champion III
Champion III

I have no clue what you're trying to do. However, in set analysis, the literal value needs to be in curly brackets, like this:

={'P0300000'}

You also can't do a sum() inside of a sum(), or at least not without an aggr(), which probably isn't what you're trying to do anyway.

Not applicable


if(@_HFM_Code_Group='P03000000',if(#_ClaimsAmount>0,#_ClaimsAmount,(sum({$<@_HFM_Code_Group={'P03000000'}>} #_NetSalesValue)+sum({$<@_HFM_Code_Group={'P03000000'}>} #_Amount_Fixed_Cost))),#_ClaimsAmount)


Will do quite literally what you have described but in agreement with John, i don't think we have enough information to determine if it's what you /need/

Without knowing your dimensions i can't tell if you need the set anaylsis or the sums as i don't know what you are grouping by but i ahve included them so you can get handle on the syntax