Hey, I have to find Maximum [Sequence] for each [Item] and for each [Company_Code] .
I am using the below piece of code but for some Item it is working and for some it is not.
[Max_SEQN]: Mapping Load "T$ITEM" & '|' & Company_Code, floor(num(max("T$SEQN"))) as [Max_SEQN_Updated] FROM [$(vSource)\TTICPR301.qvd](qvd) Group By Company_Code, "T$ITEM", "T$INDT";
ApplyMap('Max_SEQN',"T$ITEM" & '|' & Company_Code,'-') as [Max_SEQN_Table], if(ApplyMap('Max_SEQN',"T$ITEM" & '|' & Company_Code,'-') = floor(num("T$SEQN")),1,0 ) as [Max_SEQN_Flag];
Below is the result -
As you can see the [Sequence] column is not matching with [Max_SEQN_Table] and hence it is not selecting the maximum.