Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On May 18th at 10AM EDT we will answer your QlikView questions live. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
amiroh81
Creator
Creator

Dimension with case

Hello all,

I want to built dimension with sum of expression.
For example:

i have table like this

Month number count

--------- --------- ----------

jan      22222    100

jan      22222     205

jan      33333     150

feb      22222     50

feb      33333     100

feb      33333      50  

and i want to add dimension  (type) that wiil show me -  if(sum(count)>'300','big','small')

Month number count  type

--------- --------- ----------  -------

jan      22222     305     big

jan      33333     150   small

feb      22222     50     small

feb      33333     150   small

if i add expression with this case i get blank field.

thanks in advaned

Amir

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try =aggr(if(sum(count)>'300','big','small'),Month)


talk is cheap, supply exceeds demand

View solution in original post

7 Replies
Gysbert_Wassenaar

Try =aggr(if(sum(count)>'300','big','small'),Month)


talk is cheap, supply exceeds demand

View solution in original post

sunny_talwar

Try using it like this (without the single quotes)

=If(Sum(Count)>300,'big','small')

HTH

Best,

S

Not applicable

try the following as dimensions:

Aggr(If(Sum(Count) >= 300, 'BIG', 'Small') , Month)

Not applicable

Hi,

Can You use in script

TEST:

LOAD * INLINE [

Month,Number,Count

jan,      22222  ,  100

jan  ,    22222 ,    205

jan ,     33333 ,    150

feb  ,    22222  ,   50

feb ,     33333  ,   100

feb  ,    33333  ,    50

];

TEST2:

LOAD Month&Number&Sum(Count) as KEY,

Month,

Number

Resident TEST Group by

Month,Number;

DROP Table TEST;

Regards

Vimlesh

anbu1984
Master III
Master III

Dim: Month,number

Expr: sum(count)

if(sum(count)>'300','big','small')

simenkg
Partner
Partner

Create a Straight Table with

Dimensions:

Month

Number

Expressions.

Sum(Count) // label the expression i.e: TotalCount

=if(TotalCount>300, 'Big', 'Small') // Reference the label of the above expression and test on it.

amiroh81
Creator
Creator
Author

Thank you all