Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Live chat with experts, bring your API Integration questions. June 15th, 10 AM ET. REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
hoong0607
Partner
Partner

How to show the latest Parts Number based on the Chain No

Hi, I would like to seek for help to solve this. I need to include the latest part number into the table. The latest Part Number is based on the Seq No. of each Chain No and it should be repeated for every rows as below:

image.png

I used the following set analysis script but only able to get the result when i filter by one Chain no, it will be null when select multiple Chain no and/or full table. 

only({<No.={"$(=MaxString({<[Month]=, [Year]=>}Total <Chain No> Seq No.))"}>} TOTAL<Chain No> PartsNumber)

Thank you 

8 Replies
kaushiknsolanki
Luminary Alumni
Luminary Alumni

Hi,

If partner is always incremental and a number value then you can use this.

Max(total<ChainNo>Partnumber)

Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".
hoong0607
Partner
Partner
Author

Hi Kaushik, 

The PartsNumber is not always incremental, the picture is the dummy data i created for easier understanding.  The actual Part Number is combination of text and number and in text format, such as ABC1234D. The max Part Number depends on the max seq no for each chain no.

Thank you. 

 

asinha1991
Creator III
Creator III

I assume you have pasrtsnumber, chain No and Seq No as dimension

try this in expression,

 

 firstsortedvalue(Total<[chain No]> pasrtsnumber, - [Seq No.])

hoong0607
Partner
Partner
Author

Spoiler
 

 Hi Asinha, 

No Its not working. 

asinha1991
Creator III
Creator III

can you share exact description of your table object like

what are dimensions and expressions

hoong0607
Partner
Partner
Author

Hi Asinha, 

It is actually a master data table, no transaction data. There are Chain Type and Chain Type desc dimensions but not relevant so i didnt post. The main dimensions are: PartsNumber, Chain No, and Seq No.

asinha1991
Creator III
Creator III

I tried with sample data at my end, and it works...is it giving a wrong output or nothing at all? can you check if all dimension name in expression are good if its giving nothing at all

hoong0607
Partner
Partner
Author

Hi It returns null. All dimensions are correct...