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

Calculating sum based on a condition.

Hi,

I'm trying to find the sum of a field based on a condition that is given to another field.

example- Sum(No.of.Customers) if(Day>3 AND Day<5)

Field names-No.of.Customers and Day.

Can some one help me clear this.

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

COUNT({<Day = {">=3<=5"} >}Customer)

or

SUM({<Day = {">=3<=5"} >}Customer)

View solution in original post

7 Replies
MK_QSL
MVP
MVP

COUNT({<Day = {">=3<=5"} >}Customer)

or

SUM({<Day = {">=3<=5"} >}Customer)

Not applicable
Author

That worked well, thank you so much.

Not applicable
Author

I'm using this expression:

Num((((SUM({<Day = {">=3<5"} >}[No of Customers]))/(Sum([No of Customers])))*100),'##.00')

Can you tell me how to add '%' to it at last.

example- 12.45%

MK_QSL
MVP
MVP

Num((((SUM({<Day = {">=3<5"} >}[No of Customers]))/(Sum([No of Customers])))*100),'#0.00%')

Not applicable
Author

When I use:

Num((((SUM({<Day = {">=3<5"} >}[No of Customers]))/(Sum([No of Customers])))*100),'##.00')


The value I get is : 28.53

But when I use :

Num((((SUM({<Day = {">=3<5"} >}[No of Customers]))/(Sum([No of Customers])))*100),'#0.00%')



It becomes : 2852.87%

MK_QSL
MVP
MVP

Sorry.. Remove * 100

Not applicable
Author

Thank you very much.