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

how to write this expression in script

=SUM({<R3={'C'},[Sold To Opt Out Flag]={'N'}>}TOTAL <[Territory Name]> [Monthly Sales]

1 Solution

Accepted Solutions
anbu1984
Master III
Master III

Load [Territory Name],SUM([Monthly Sales])

Resident Table

Where R3='C' and [Sold To Opt Out Flag]='N'

Group by [Territory Name]

View solution in original post

17 Replies
avinashelite

if(R3='C' and [Sold To Opt Out Flag]='N',Aggr(sum([Monthly Sales]),[Territory Name]))

Not applicable
Author

Is it working in script editor

anbu1984
Master III
Master III

Load [Territory Name],SUM([Monthly Sales])

Resident Table

Where R3='C' and [Sold To Opt Out Flag]='N'

Group by [Territory Name]

avinashelite

if you want  the sum then you need to create a resident load and use the group by function

Not applicable
Author

Thanks for your reply

But the actual expression is

=AGGR(NUM(RANK(SUM({<R6={'C'},[Organization Name]=,[Organization ID]=,[Organization Name|ID]=,[Sold To Opt Out Flag]={'N'}>}[Monthly Sales]), 4, 1)),[Organization Name|ID])

the above is the script i am trying to do in script editor

avinashelite

Hi,

set analysis wont work in the script . Please follow the anbu approach

Not applicable
Author

hi ,how to use rank function in load statement

anbu1984
Master III
Master III

Temp:

Load [Territory Name],SUM([Monthly Sales]) MonthlySales

Resident Table

Where R3='C' and [Sold To Opt Out Flag]='N'

Group by [Territory Name]

Rank:

Load *,RowNo() As Rank Resident Temp Order by MonthlySales desc

Not applicable
Author

thanks for reply anbu will apply n let u know