Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have data with Document, Version, and Text as follows:
Document | Version | Text |
Doc1 | 1 | The |
Doc1 | 2 | The dog was a pitbull. |
Doc2 | 54 | The father |
Doc2 | 55 | The father was an |
Doc2 | 55 | engineer. |
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:
Document | Version | Text |
Doc1 | 2 | The dog was a pitbull. |
Doc2 | 55 | The father was an engineer. |
Dim1:
Document
Dim2:
Version
Expression:
if(Version=max(total <Document> Version),Concat(Text,' '))
Dim1:
Document
Dim2:
Version
Expression:
if(Version=max(total <Document> Version),Concat(Text,' '))
Thanks Xufei, it works perfectly.
Would you be able to explain what the total<Document> does here?
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