Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load de l'enregistrement ayant la valeur maximum

Bonjour à tous,

Je récupère des fichiers servant à logguer les status d'un projet, ces fichiers ont le type d'enregistrement suivant:

         

Meeting DateMeeting TypeGateWay TypeGateWay WeightProjet RefProjet NameRoadmapT-1T0T1T2T3T4T5T6
07/02/2017SteerCoT35THX-005Final Name 12017RM_04211/07/201620/09/2016 07/02/2017
20/09/2016SteerCoT02THX-005Reviewed Name 12017RM_04911/07/201620/09/2016
11/07/2016Advosory CoT-11THX-005Initial Name 1NR11/07/2016
01/02/2017SteerCoT35THX-005Final Name 22016RM_03004/07/201620/09/2016 01/02/207
15/09/2016SteerCoT02THX-005Reviewed Name 22016RM_03004/07/201620/09/2016
04/07/2016Advosory CoT-11THX-005Initial Name 2NR04/07/2016

Je ne voudrais charger que les enregistrer ayant la valeur maximum de la colonne "Gateway Weight"

donc ces derniers :

         

Meeting DateMeeting TypeGateWay TypeGateWay WeightProjet RefProjet NameRoadmapT-1T0T1T2T3T4T5T6
07/02/2017SteerCoT35THX-005Final Name 12017RM_04211/07/201620/09/2016 07/02/2017
01/02/2017SteerCoT35THX-005Final Name 22016RM_03004/07/201620/09/2016 01/02/207

J'ai cherché du côté de group by et firstvalue mais je cale.

Merci d'avance pour votre aide.

1 Solution

Accepted Solutions
Not applicable
Author

Finally I managed to do that with firstsortedvalue on each field where i need to get the last value.

firstsortedvalue(ApplyMap('Tbl_Comite',[Meeting Type]),-[GateWay Weight]) As [Meeting Type],

View solution in original post

4 Replies
Anil_Babu_Samineni

May be use Front End in Straight Table

Max([GateWay Wight])

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Not applicable
Author

J'aii fait une erreur il y a 2 références projets différentes, le but étant de sortir les enregistrements avec le dernier statut du projet donc on peut prendre que les 3 derniers lignes du premiers tableau portent une réf de projet du type THX-006

Not applicable
Author

Hi Anil,

In fact I tried, but I don't know how to use that max in the loading script

I load all the record in a temp table then I tried something like :

FinalTable:

NoConcatenate LOAD 

        [Meeting Type],

        [Meeting Date],

        [GateWay Type],

        Max([GateWay Weight]),

        ......

RESIDENT TempTable

GROUP BY [Meeting Type], [Meeting Date], [GateWay Type],... ;

Not applicable
Author

Finally I managed to do that with firstsortedvalue on each field where i need to get the last value.

firstsortedvalue(ApplyMap('Tbl_Comite',[Meeting Type]),-[GateWay Weight]) As [Meeting Type],