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: 
Anonymous
Not applicable

Date greater than in visualization

Hi all,

I have a combo bar/line graph that's displaying all the data for all the dates when I really only want it to show data for 3 years.  I have the dimension field as

=Dual(Year([Date])&'-'&Month([Date]),MonthStart([Date]))

Which is working just fine to give the month-year.  I just can't seem to get the graph to start at about Jan-2015

GraphExamp.PNG

3 Replies
YoussefBelloum
Champion
Champion

Hi,

you should use a set analysis inside your expression, what is the expression you're using ?

Anonymous
Not applicable
Author

The expression posted above is what I'm using as a dimension for date

Anonymous
Not applicable
Author

Hi Kyle,

The way I do it is by limiting the returned values of the dimension and expressions.

Here's one that limits the returned dates to 2018 or later.

if(Year(Promo_To_Date)>='2018',Date(Promo_To_Date,'DD.MM.YYYY')+1)

Or if you wish to use a sliding window then something like this.

if(Date(Promo_To_Date,'DD.MM.YYYY')>=Addmonths(Date(Today(2),'DD.MM.YYYY'),-1),Date(Promo_To_Date,'DD.MM.YYYY')+1)

After this I disable Null values on the field and I'm only left with the selected date range hard coded in the chart.