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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
paulwalker
Creator III
Creator III

Exclude data

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

paulwalker_0-1684843289536.png

my output should be

paulwalker_3-1684843499965.png

Thanks in Advance!

 

Labels (1)
3 Replies
Chanty4u
MVP
MVP

Try this 

SUM({<Name = {"=MIN(value) >= 11"}>} value)

 

Kushal_Chawda

@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)

 

Screenshot 2023-05-23 151740.png

PrashantSangle

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

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂