Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum of sales for a specific group

Hello everyone,

I have a table with two columns,Carrier and Sales. Carrier Field has two types of value one record for PRODUCE and one for DRY.

The issue is to show sum(sales) in a text object. But whenever a Produce carrier field is selected it sum(sales) for all PRODUCE field

the same with DRY field.

I have attached application and xls file.Please if anyone has any idea please share with me.

Thanks and Regards

bhawna

1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

Try

If(Match(SubField(CARRIER,'-',2),'PRODUCE'),Sum({<CARRIER={'*PRODUCE*'}>} Sales),

If(Match(SubField(CARRIER,'-',2),'DRY'),Sum({<CARRIER={'*DRY*'}>} Sales)))

Regards

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Use this in your Text Box and it worked

if(if(match(SubField(CARRIER,'-',2),'PRODUCE'),Sum(Sales))>0,if(match(SubField(CARRIER,'-',2),'PRODUCE'),Sum(Sales)),if(match(SubField(CARRIER,'-',2),'DRY'),Sum(Sales)))

antoniotiman
Master III
Master III

Try

If(Match(SubField(CARRIER,'-',2),'PRODUCE'),Sum({<CARRIER={'*PRODUCE*'}>} Sales),

If(Match(SubField(CARRIER,'-',2),'DRY'),Sum({<CARRIER={'*DRY*'}>} Sales)))

Regards

Not applicable
Author

Thank you Antonio..