Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
linoyel
Specialist
Specialist

Chart time dimension based on min and max dates

Hi all,

On one of Qlikview tasks I was asked to build a chart where time dimension was supposed to be dynamically calculated and the dates range was supposed to be between min and max dates.

I wasn't sure how to do it and I was told there is an option in Qlikview to set min and max values in charts...

Does anyone familiar with this option?

I'll appreciate your answers,

Thanks

1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

9 Replies
MK_QSL
MVP
MVP

Use Set Analysis with Min and Max Date criteria.

SUM({<Date=,Year=, Week=, Month=, Quarter=, Date = {">=$(=Min(Date))<=$(=Max(Date))"}>}Sales)

linoyel
Specialist
Specialist
Author

OK.. this is the expression, but how I build a dimension based on the interval between min(date) and max(date)?

MK_QSL
MVP
MVP

Provide sample application. Would try for you!

dickelsa
Creator
Creator

it should work automatically if you check 'surpress when value is nul' for your dimension?

antoniotiman
Master III
Master III

Hi Linoy,

If Dim is Your Dimension, Date Your Date

vMinDate  Variable Min Date, vMaxDate Variable Max Date

In Chart (e.g. Pivot Table)

Dimension :

=Aggr(If(Date >= '$(vMinDate)' and Date <= '$(vMaxDate)',Dim),Dim)

Regards,

Antonio

linoyel
Specialist
Specialist
Author

Hi Antonio, this looks like a reasonable solution, I'll try that

Thanks

linoyel
Specialist
Specialist
Author

OK, attached

The task is to show the chart only if one of the projects (Project Name) is chosen by user.

Every project has versions and there is a field that indicates if it is the last version or not.

Let's say the chart has to show how many "bad" Stats and how many "good" Stats there were for a specific project.

The dimension is supposed to be between min and max dates which are supposed to be calculated in a following way:

we need to take only last version's Project Start Date, for min value we need to take 2 months before that date and for max value we need to take 3 months after that date.

For example, if we choose 'bbb' project, the last version's date is 15/03/2015. So min date for this project would be 15/01/2015 and max date would be 15/06/2015.

antoniotiman
Master III
Master III

See attachment

linoyel
Specialist
Specialist
Author

Yes!

Thanks, Antonio