Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
saviostrazzullo
Contributor III
Contributor III

Date and Set Analysis

Hi,

I have a field date and I want calculate the difference of a measure between the max date and min date selected, setting them in a set analysis. Something like this:

sum( {$<Date= Max(Date)>},measure ) - sum( {$<Date= Min(Date)>},measure ).

How can I do it?

Thank you

Savio

1 Solution

Accepted Solutions
sunny_talwar

May be this:

Sum({$<Date = {"$(=Date(Max(Date), 'DateFieldFormat'))"}>} measure) - Sum({$<Date = {"$(=Date(Min(Date), 'DateFieldFormat'))"}>} measure)

View solution in original post

4 Replies
sunny_talwar

May be this:

Sum({$<Date = {"$(=Date(Max(Date), 'DateFieldFormat'))"}>} measure) - Sum({$<Date = {"$(=Date(Min(Date), 'DateFieldFormat'))"}>} measure)

tresesco
MVP
MVP

Try like:

sum( {$<Date= {'$(=Date(Max(Date)))'}>} measure ) - sum( {$<Date= {'$(=Date(Min(Date)))'}>} measure )

Gysbert_Wassenaar

You were quite close. Try this:


sum( {$<Date={$(=Max(Date))}>},measure ) - sum({$<Date={$(=Min(Date))}>},measure )


If it doesn't work then perhaps your Date field isn't a real date field or there's some issue with the date format. In that case please post a small qlikview document that demonstrates the issue.


talk is cheap, supply exceeds demand
saviostrazzullo
Contributor III
Contributor III
Author

Thank you for your help, all the answers were correct!

Cheers

Savio