Skip to main content
Announcements
Qlik Announces Qlik Talend Cloud and Qlik Answers: LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
alexpanjhc
Specialist
Specialist

how to get the max and min in a straight table

IDDaysmax(days)-min(days)-currentvalue
A50
B7-2
C23

Hi experts,

I have a straight table with ID and Days. ID is the dimension and Days is expression. i want to create the 3rd column as an expression but i do not know how to write the expression.

I want to find out the max number of days (7) and min number of days (2) in Days column and use that number  (5) minus the value in Days.

as the selections changes, the max number of days and min number of days will be changed  dynamically.

How do I achieve this?

thanks!

10 Replies
sunny_talwar

You can.... I just like using RangeSum as + and - can't handle nulls, whereas RangeSum can.... you can use this

Max(TOTAL Aggr(DaysExpressionHere, ID)) - Min(TOTAL Aggr(DaysExpressionHere, ID)) - Days