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: 
hobanwashburne
Creator
Creator

Displaying the data associated with the Max value only in a chart

I have a basic chart the dimensions being

Part Number/Customer

and the Expression

Max(InvoiceDate)

That currently returns data such as

Row / PartNumber / Customer / InvoiceDate

1         A                    1                 3/8/16

2         B                    2                 4/6/16

3         B                    3                 4/8/16

4         C                    4                 4/5/16

I would like to discard row 2 so that each part number is only displayed once regardless of the customer. Is this possible?

1 Solution

Accepted Solutions
sunny_talwar

or you can try this:

Dimension

PartNumber

Aggr(FirstSortedValue(Customer, -InvoiceDate), PartNumber) *

* Select 'Suppress When Value Is Null' for this dimension

Expression

Max(InvoiceDate)

View solution in original post

4 Replies
gajapathy74
Creator II
Creator II

Instead of Max(InvoiceDate), can you try Aggr(Max(InvoiceDate), PartNumber)

hobanwashburne
Creator
Creator
Author

Close, however now the chart is displaying:

PartNumber / Customer / InvoiceDate

B                     2                4/8/16

Which is concerning because although the max invoice date is 4/8/16 it is not for customer #2

sunny_talwar

May be use this

Dimension:

PartNumber

Expressions:

FirstSortedValue(Customer, -InvoiceDate)

Max(InvoiceDate)

sunny_talwar

or you can try this:

Dimension

PartNumber

Aggr(FirstSortedValue(Customer, -InvoiceDate), PartNumber) *

* Select 'Suppress When Value Is Null' for this dimension

Expression

Max(InvoiceDate)