Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Haritha7
Contributor II
Contributor II

Single code for One title

Hi Everyone,

 I have single table data like :

Title Code
Books we12
Books we13
Books we14
Books we15
Pens rt25
Pens rt26
Pens rt27
Pens rt28
Bag op78
Bag op79
Bag op80
Bag op81
Bag op82

 

Output would be like:

Title Code
Books we12
Pens rt25
Bag Bag

 

I have to show every unique Title with one Code only in result table.

 

Thanks in Advance, 

Haritha. 

 

 

Labels (1)
8 Replies
steeefan
Luminary
Luminary

How would you identify the code which should be shown?

jochem_zw
Employee
Employee

Try something like this an expression in a table

Dimension = Title

Measure = Only({<N={1}>}Code)

in Script create field N with 'AutoNumber(Code,Title) as N', and by using this field only the first title will be showed

Ahidhar
Creator III
Creator III

you can try this in script

tab:
load Title,FirstValue(Code) as Code group by Title;
load * inline
[
Title, Code
Books, we12
Books, we13
Books, we14
Books, we15
Pens, rt25
Pens, rt26
Pens, rt27
Pens, rt28
Bag, op78
Bag, op79
Bag, op80
Bag, op81
Bag, op82
];

Ahidhar_0-1704711049516.png

 

Haritha7
Contributor II
Contributor II
Author

Hi Steeefan,

Any code we have to show either 1st (or) Middle one (or) Last one. But, every unique title gets only single code not multiple codes.

 

Thankyou,

Haritha.  

Haritha7
Contributor II
Contributor II
Author

Thankyou 😊

Haritha7
Contributor II
Contributor II
Author

Thankyou Ahidhar 😊

steeefan
Luminary
Luminary

It's still not clear to me how you would identify which code to show for which title.

vinieme12
Champion III
Champion III

kindly close the thread by accepting @Ahidhar  response as soluion

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.