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: 
jwheatonumich
Contributor II
Contributor II

Display Aggregated Text by Largest Value in Another Field

I have data with Document, Version, and Text as follows:

DocumentVersionText
Doc11The
Doc12The dog was a pitbull.
Doc254The father
Doc255The father was an
Doc255engineer.

 

I would like to create a chart table that concatenates the text for each document, but only the highest version number for that document.

My intended output for the above is:

DocumentVersionText
Doc12The dog was a pitbull.
Doc255The father was an engineer.
1 Solution

Accepted Solutions
NZFei
Partner - Specialist
Partner - Specialist

Dim1:

Document

Dim2:

Version

Expression:

if(Version=max(total <Document> Version),Concat(Text,' '))

View solution in original post

3 Replies
NZFei
Partner - Specialist
Partner - Specialist

Dim1:

Document

Dim2:

Version

Expression:

if(Version=max(total <Document> Version),Concat(Text,' '))

jwheatonumich
Contributor II
Contributor II
Author

Thanks Xufei, it works perfectly.

Would you be able to explain what the total<Document> does here?

NZFei
Partner - Specialist
Partner - Specialist

Using Total in set analysis ignore all the dimensions except the ones in <>.

In this case, max(total <Document> Version) is the max version number per document (Dimension2 "Version" is ignored, Dimension1 "Document" is not ignored so it is max version number by document).

Search "Defining the aggregation scope" in QlikView help page for some examples and explanations but it isn't better than mine (it didn't explain "<>" at all)...

 

Fei