Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Date Dimension Limited to Possible Only

In my chart, I have two dimensions: Customer and Quarter

I want to only show the calendar's possible Quarters based on the max date. Primarily because without doing this my expression shows a row/column of 0's because of no data.....because it is in the future.

So how do you exclude future dates if your dimension is

For example:

Year = 2012

Today = 08/09/2012

Possible dates = everything before 'today'

Month = August

Possible months = everything from August to January (January representing the lowest possible month given the max year of 2012)

Quarter = 3

Possible quarters = 1, 2, and 3 -----> not 4 because the highest date has determined it hasn't happened yet

1 Solution

Accepted Solutions
MayilVahanan

Hi

     Try like this,

     = if you have date field,

     =Sum({<DateField = {'>=$(=MonthStart(Min(DateField)))<=$(=Date(Today()))'}>}Sales)

     Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

1 Reply
MayilVahanan

Hi

     Try like this,

     = if you have date field,

     =Sum({<DateField = {'>=$(=MonthStart(Min(DateField)))<=$(=Date(Today()))'}>}Sales)

     Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.