Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

min value - max value of field by dimension

Hi community,

How would I do aggr on the following to get the max value - min value for my dimension Project Name?  Here is my code, and what I tried:

max(total DATES_ISO_DATE2)-min(total DATES_ISO_DATE2)

aggr((max(total DATES_ISO_DATE2)-min(total DATES_ISO_DATE2)),[Project Name])

1 Solution

Accepted Solutions
swuehl
MVP
MVP

You want the max and min dates across all dimension values or per dimension value? Your expression could result in a difference across all dimension values (using TOTAL). Remove the TOTAL qualifier if you want a result per dimension value.

View solution in original post

2 Replies
swuehl
MVP
MVP

You want the max and min dates across all dimension values or per dimension value? Your expression could result in a difference across all dimension values (using TOTAL). Remove the TOTAL qualifier if you want a result per dimension value.

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

If you need it based on dimensions you should not use TOTAL here.

Or

You have many dimensions but need the min and max based on first dimension(or any other dimension) you can use like below

Min(Total<[Project Name]> DATES_ISO_DATE2)

Max(Total<[Project Name]> DATES_ISO_DATE2)