Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
MVP & Luminary
MVP & Luminary

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


talk is cheap, supply exceeds demand

View solution in original post

7 Replies
Highlighted
MVP & Luminary
MVP & Luminary

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


talk is cheap, supply exceeds demand

View solution in original post

Highlighted

Try using it like this (without the single quotes)

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

HTH

Best,

S

Highlighted
Not applicable

try the following as dimensions:

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

Highlighted
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

Highlighted
Master III
Master III

Dim: Month,number

Expr: sum(count)

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

Highlighted
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.

Highlighted
Creator
Creator

Thank you all