Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Try =aggr(if(sum(count)>'300','big','small'),Month)
Try =aggr(if(sum(count)>'300','big','small'),Month)
Try using it like this (without the single quotes)
=If(Sum(Count)>300,'big','small')
HTH
Best,
S
try the following as dimensions:
Aggr(If(Sum(Count) >= 300, 'BIG', 'Small') , Month)
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
Dim: Month,number
Expr: sum(count)
if(sum(count)>'300','big','small')
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.
Thank you all