Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
hoong0607
Partner - Contributor
Partner - Contributor

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
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

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

Max(total<ChainNo>Partnumber)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
hoong0607
Partner - Contributor
Partner - Contributor
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 - Contributor
Partner - Contributor
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 - Contributor
Partner - Contributor
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 - Contributor
Partner - Contributor
Author

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