Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
May be this:
Sum({$<Date = {"$(=Date(Max(Date), 'DateFieldFormat'))"}>} measure) - Sum({$<Date = {"$(=Date(Min(Date), 'DateFieldFormat'))"}>} measure)
May be this:
Sum({$<Date = {"$(=Date(Max(Date), 'DateFieldFormat'))"}>} measure) - Sum({$<Date = {"$(=Date(Min(Date), 'DateFieldFormat'))"}>} measure)
Try like:
sum( {$<Date= {'$(=Date(Max(Date)))'}>} measure ) - sum( {$<Date= {'$(=Date(Min(Date)))'}>} measure )
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.
Thank you for your help, all the answers were correct!
Cheers
Savio