Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
brunolelli87
Creator II
Creator II

How can I limit my dimension?

Hello guys,

I'm using a date field (DD/MM/YYYY) as dimension, called PERI.
This field contains values from 01/01/2015 up to 01/01/2025, but I don't want to show values from today up to 01/01/2020, how can I do it?

I would like to show just the past values up to today!

Example:
01/01/2015,
02/01/2015,

...
today()

 

Thanks

1 Solution

Accepted Solutions
Saravanan_Desingh

Something like prepare the Calendar.

tabCalendar:  
LOAD Date(MinDate+(IterNo()-1)) as TranDate,
	 If(Date(MinDate+(IterNo()-1))>='1/1/2020' And Date(MinDate+(IterNo()-1))<=Today(), 'N', 'Y') As DimFlag 
While MinDate+IterNo() <= MaxDate;  
LOAD '1/1/2015' As MinDate,  
     '1/1/2025' As MaxDate  
AutoGenerate 1;

In the Dimension.

If(DimFlag='Y',TranDate)

View solution in original post

4 Replies
Arthur_Fong
Partner - Specialist III
Partner - Specialist III

How would you like to do this? Front End or Script?

brunolelli87
Creator II
Creator II
Author

I prefer via script, but it’s up to you!

Thanks
brunolelli87
Creator II
Creator II
Author

Any idea?

Saravanan_Desingh

Something like prepare the Calendar.

tabCalendar:  
LOAD Date(MinDate+(IterNo()-1)) as TranDate,
	 If(Date(MinDate+(IterNo()-1))>='1/1/2020' And Date(MinDate+(IterNo()-1))<=Today(), 'N', 'Y') As DimFlag 
While MinDate+IterNo() <= MaxDate;  
LOAD '1/1/2015' As MinDate,  
     '1/1/2025' As MaxDate  
AutoGenerate 1;

In the Dimension.

If(DimFlag='Y',TranDate)