Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
varma8998
Contributor III
Contributor III

How to calculate variance betwen max and min date in set analysis

Hi All,

I am trying to calculate variance for max - min date

below is the format of my table

Emp   date         Amount

XXXX 12/31/19   250000

XXXX  09/30/19  350000

XXXX 12/31/19   450000

XXXX 09/30/19   650000

I want to calculate the variance between max and min

I have done as below format

(sum({<date = {'$=max(date)'}>}Amount) - sum({<date = {'$=min(date)'}>}Amount)) / sum({<date = {'$=min(date)'}>}Amount)

I am not getting the value after I did like this

someone please help me on this

3 Replies
tresesco
MVP
MVP

Try like:

(Sum({<date = {'$(=date(max(date)))'}>}Amount) - sum({<date = {'$(=date(min(date)))'}>}Amount)) / sum({<date = {'$(=date(min(date)))'}>}Amount)

varma8998
Contributor III
Contributor III
Author

Hi,

 

I am still facing the same problem I am not getting the ouput

tresesco
MVP
MVP

Could you share a sample or screenshot showing the issue? Else try to add more details to your problem statement like - where, how, ...