Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
fah18
Contributor II
Contributor II

Only show data for the Last 3 months

Hello all,

I have a reported date field. I have used that field to populate the Months. I need my charts to only show the last 3 months by default. How can I achieve this?

Labels (3)
4 Replies
GaryGiles
Specialist
Specialist

Try this in your set analysis of the expressions in your chart:

{$<[Reported Date]={"<=$(=Date(Today()))>=$(=Date(Addmonths(Today(),-3)))"}

fah18
Contributor II
Contributor II
Author

Hello,

 

Many thanks for this. However, When I try to do the following, it says error with this expression.. 😞 Any idea what could possibly be wrong? I should set this in the measures right?

GaryGiles
Specialist
Specialist

Can you post the expression that gives you an error?  Hard to know what the issue might be without seeing it.

fah18
Contributor II
Contributor II
Author

Maybe, I am not being clear with what I need. I have data that has information for Dec-20, Jan-21, Feb-21, Mar-21. 

I only want to show the data for the months Jan-Mar - 21. Even the dimensions at the filter Pane, should only show these 3 months. 

What is the best solution for this? 1) To Load only the data for the 3 months or 2) To have set analysis?

However, the error msg is

fah18_1-1616910408940.png

Thanks 🙂