Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI Community,
I have to exclude data if value is less than 11 (if any records falling under value 11 that should be exclude group level)
let say Name=ABC has two records, values are 10 and 15 (these records should be exclude because falling under less than 11 bucket)
below is my sample data
LOAD * INLINE [
Name, Product, value
ABC, A1, 10
ABC, A2, 15
BCA, B1, 9
BCA, B2, 12
XYZ, X1, 19
XYZ, X2, 21
CAA, C1, 34
ZZZ, Z1, 9
];
SUM({<value={">10"}>}value) - this expression not giving correct result
my output should be
Thanks in Advance!
Try this
SUM({<Name = {"=MIN(value) >= 11"}>} value)
@paulwalker this is the best way I could think of
LOAD *, Name & Product as Dimension_Key INLINE [
Name, Product, value
ABC, A1, 10
ABC, A2, 15
BCA, B1, 9
BCA, B2, 12
XYZ, X1, 19
XYZ, X2, 21
CAA, C1, 34
ZZZ, Z1, 9
];
AUTONUMBER Dimension_Key;
Add more dimension to Key if you are going to have more dimension in your table
create a table with Dimension Name, Product with below expression
=sum({<Name=p({<Dimension_Key={"=sum(value)>10"}>}Name) - p({<Dimension_Key={"=sum(value)<=10"}>}Name)>}value)
you can create flag in back end for same and using same flag you can remove it from table
like
Test:
LOAD * INLINE [
Name, Product, value
ABC, A1, 10
ABC, A2, 15
BCA, B1, 9
BCA, B2, 12
XYZ, X1, 19
XYZ, X2, 21
CAA, C1, 34
ZZZ, Z1, 9
];
Left Join
Temp:
Load Name, if(min_value<11,'1','0') as flag;
Load Name, min(value) as min_value Resident Test group by Name;
In front end
take > table
dimension > Name , Product
measure > Sum({<flag={'0'}>}value)
Regards,
Prashant Sangle