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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
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.

1 Solution

Accepted Solutions
its_anandrjs
Champion III
Champion III

Hi,

This are very simple SET analysis

For Big

sum({< TYPE  = {'BIG'}>} amount)


with if condition

sum(If( TYPE = 'BIG' , amount ))



For Small

sum({< TYPE = {'SMALL'}>} amount)


With If condition

sum(If( TYPE = 'SMALL' , amount ))

Regards

Anand

View solution in original post

14 Replies
senpradip007
Specialist III
Specialist III

Could you please more descriptive?

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

You need some sort of association between the amount field and the type field. Or some rule which can be used to identify which amounts are big and which are small.

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

when tupe is small then sum(amount)  -  small associated values sum(amount)

type is big then sum(amount)  -  long associated values sum(amount)

its_anandrjs
Champion III
Champion III

Hi,

Is this two fields  AMOUNT and TYPE are in same table then please provide some data or you can use SET analysis for this.

Regards

Anand

ychaitanya
Creator III
Creator III

Amount_Table:

Load Amount,

If(Amount>300 ,'BIG' ,'SMALL')) as Type

From

Mysample.xls;

Type_Table:

Load * INLINE [ TYPE

'BIG'

'SMALL'

];

Then Assocaitions will be formed in Data Model and if you plot list boxes for Amount and Type .. then you can find the Big and Small amounts.

Hope this helps.

Mark the threads as helpful or answered which will help the others.

Thanks

Chaitanya

Not applicable
Author

s  pls tell me set analysis expression for this

anbu1984
Master III
Master III

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

ychaitanya
Creator III
Creator III

If( Type= 'BIG',Sum({$ <Type='BIG'>} Amount),Sum({$ <Type='SMALL'>} Amount))

its_anandrjs
Champion III
Champion III

Hi,

This are very simple SET analysis

For Big

sum({< TYPE  = {'BIG'}>} amount)


with if condition

sum(If( TYPE = 'BIG' , amount ))



For Small

sum({< TYPE = {'SMALL'}>} amount)


With If condition

sum(If( TYPE = 'SMALL' , amount ))

Regards

Anand