Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us at Qlik Connect 2026 in Orlando, April 13–15: Register Here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Max in Dimension Table

I have the following code in dimensions tab on my pivot table:

  • MAX(DATE(date_ship))

Where date_ship is a datetime variable. But it give me an error like "Error in Calculated Dimension"

Anyone knows waht's happening?

Thanks!!!

Labels (1)
3 Replies
sunny_talwar

To use Max in your dimension you will need to use with Aggr() function. Try this:

Aggr(Max(date_ship), date_ship)

swuehl
Champion III
Champion III

You would need to use something dimensional as dimension, not a scalar.

Like a field, or

=Aggr( Date(Max(date_ship)), DimensionForMaxDateField)

Replace the aggr() dimension with  appropriate field name(s).

Not applicable
Author

You can't use aggregation function directly in Dimensions expression. You need use AGGR function

Aggr(Max(Date_Ship), <DimensionFieldName>)