Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

use of max and min date in set analysis

Hello,

I have a problem calculating minimum and maximum date per certain value in the  dimension.

In the set analysis it calculates the minimum and maximum of all the values in the dimension


Example:


DimField | Initial_Value | Final_Value | fromDate | ToDate

A, 100,  200 , 250 , 1/1/2010 ,   1/1/2015

B , 50, 100, 1/1/2009 , 1/1/2014

C, 80 , 120, 1/1/2011, 1/1/2013

When I use in the set analysis an expression for the minimum date and maximum date for field C, it calculates the minimum date as  '01/01/2009' instead of '01/01/2011' and the maximum date as '01/01/2015' instead of '01/01/2013'

I heard this can be solved with aggregate function or with "firstsortedvalue"

Any suggestions?

3 Replies
swuehl
MVP
MVP

Set Analysis will be evaluated once per chart, not per dimension line, same for dollar sign expansions ( I assume that's how you get the min date into your set expression?).

If you want help with your expression, you should actually post the expression and what you expect to see, i.e. your requirement for the calculation.

miguelbraga
Partner - Specialist III
Partner - Specialist III

Hi Gilad,

I was wondering what sort of set analysis have you used in your expression. Can you please describe it here or upload your binary so that we can take a look and help you? My guess is that it seems that your expression is wrongly writen.

I'll keep in contact

Regards,

MB

Anonymous
Not applicable
Author

Hello,

Attached are qv file and excel that can help explain my problem

Thank you,

Gilad