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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

urgent expression?

i have a  AMOUNT FIELD,  TYPE FIELD,

AMOUNT:

100

200

300

400

500

TYPE :

BIG

SMALL

HERE I WANT FIND OUT AMOUNT FOR  'BIG;      WHERE TYPE =BIG  THEN    SUM(AMOUNT)--  ONLY BIG REALTED values

like wise small related  sum(amount)

i want write expressions indidually.

14 Replies
MK_QSL
MVP
MVP

What is the Logic behind Small and Big Amount

i.e. Any amount less than equal to 100 is Small and Greater Than 100 is Big.. then use as below in your script

IF(AMOUNT <=100,'Small','Big') as AmountType

Not applicable
Author


syntax eror pls check once

jagan
Partner - Champion III
Partner - Champion III

Hi Manoj,

Check this expression

For Big:

SUM({<TYPE = {'BIG'} >}AMOUNT)


For Small:

SUM({<TYPE = {'SMALL'} >}AMOUNT)

Hope this helps you.

Regards,

jagan.

anbu1984
Master III
Master III

Try this =sum({<type={'BIG'}>}amount)

mjm
Employee
Employee

Hello Manoj,

if you have both Amount and Type listed as fields in your data source then the best way to achieve this would be through set analysis:

=Sum({$<Type={'Big'}>}Amount) - Sum of Amount where Type is Big

=Sum({$<Type={'Small'}>}Amount) - Sum of Amount where Type is Small

I have attached an example app to show you this.

Please mark this as completed and answered if this helps.