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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
eddywong71
Creator
Creator

Filter Selection limited base on Criteria

Hi All,

Let say I have two Dimension Month, View.

View:[P12M,MTD,YTD]

Base on the data limitation, P12M can only select within the latest two month(Sep2024,Aug2024).

For example , The user select Month is Sep2024,Aug2024 also can select P12M in View.

Is there any expression can achieve this purpose. 

Thanks

Labels (5)
2 Replies
Rohan
Partner - Specialist
Partner - Specialist

Basically, Create a new field in your MasterCalendar :

Temp:

Load *,

if(Date>=monthstart(today(),-1),'P12M',null()) as View

Resident Mastercalendar;

Load *,

if(Date>=monthstart(today()),'MTD',null()) as View

Resident Mastercalendar;

Load *,

if(Date>=Yearstart(today(),0,4),'YTD',null()) as View

Resident Mastercalendar;

Drop Table Mastercalendar;

 

Try This out & Qlik will automatically handle your use case.

 

Regards,

Rohan.

 

 

eddywong71
Creator
Creator
Author

Hi Rohan,

Mastercalendar can not find .

I have two table : Table_A, Table_B .Both have Dimension Month.

View is a variable.

set View = =Only(View);

View:
Load * Inline [
View
MTD
YTD
P12M
]
;