Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Manuel174102
Creator
Creator

How to not display certain information in a table

Hello Everyone,

I have the following table 

Num Line
1 10000
1 30000
2 20000
2 40000
3 10000
3 50000
3 10000
3 20000
4 10000
4 20000

and I just need this : 

 

Num Line
1 10000
2 30000
3 10000
4 10000

 

I need to only keep the smaller "LINE" for each number. Can I do it in the front end? or should I do it in the back end?

 

Thanks

Labels (1)
10 Replies
brunobertels
Master
Master

hi 

load 

Num,

min(Line) as Line

from ... 

group by Num ; 

BrunPierre
Partner - Master
Partner - Master

Is your output suppose to display the first row of each Num field value?  If so then, try this

Temp:

LOAD Num,
Line,
RowNo() AS ID

From Table;

FinalTable:

LOAD Num,

FirstSortedValue(Line,ID) as Line

Resident Temp

Group by Num

Order by Num;

Drop Table Temp;

Exit Script;

 

peter_brown_0-1661161247816.png

 

Manuel174102
Creator
Creator
Author

hello!

it is not working 😞

 

i get the following message:

The following error occurred:
Unexpected token: 'min', expected one of: ',', ':', 'OPERATOR_PLUS', 'OPERATOR_MINUS', 'OPERATOR_MULTIPLICATION', 'OPERATOR_DIVISION', 'OPERATOR_STRING_CONCAT', ...
 
The error occurred here:
Load VR >>>>>>min<<<<<<(Line No_) as Line from Sales_Invoice_Line GROUP by VR
 
 
when I write min( it gets red 
Lakshminarayanan_J

@Manuel174102 

For data Model ,Kindly make use of the script posted by @brunobertels 

For front End ,Kindly use the below one as mentioned in the screenshot,

Lakshminarayanan_J_0-1661160762489.png

 

Lakshminarayanan J
To help users find verified answers, please don't forget to use the "Accept as Solution" button
Manuel174102
Creator
Creator
Author

hello!

when i write that i get this

 

The error occurred here:
Table: LOAD VR, "Line No_", RowNo() AS ID From Sales_Invoice_Line
 
Table should be the table from which I am getting the information from? 
Manuel174102
Creator
Creator
Author

HELLO,

thanks. I still get all of them.... i want to delete the ones that are not min ((i did what u told me in the front end)

Lakshminarayanan_J

@Manuel174102 

can you post the screenshot of table

 

Lakshminarayanan J
To help users find verified answers, please don't forget to use the "Accept as Solution" button
Lakshminarayanan_J

@Manuel174102 

Can you try the below expression and share the result if not working.

=Min( total <Num> Line)

Lakshminarayanan_J_0-1661161627027.png

 

Lakshminarayanan J
To help users find verified answers, please don't forget to use the "Accept as Solution" button
Manuel174102
Creator
Creator
Author

It still does not work 😞