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 Range as Dimesion

Hi,

I am struggling with the issue below and I assume it has a simple answer.

I have to create a pivot chart with 2 dimensions must show the last 3 months worth of data as the first view. I have done using the code below in the calculated dimension field.

The issue I am facing is that when a user manually select a MonthYear that is outside the dimension date range then the selected MonthYear does not appear. I have tried many if statments with GetSelectedCount etc but to no avail.

Dimension 1: Division

Dimension 2: =if(MonthYear <= vReportMonth and MonthYear>=vReportMonth-70, MonthYear)

So if the chart is showing Oct-2015 to Dec-2015, when the user selects Jun-2015, the chart does not update to show the figures to show Jun-2015.

Any ideas

4 Replies
sunny_talwar

I think you should consider using Set Analysis instead of using calculated dimension because they are more performance friendly. When will the user be selected a random MonthYear? In the MonthYear field itself, or is this a input box field?

Do you have a sample you can share?

Anonymous
Not applicable
Author

Hi Sunny,

I cannot use set analysis as i need to show monthly numbers in the pivot.

MonthYear is a field. When the user wants to see the data for a month other than the 3 months presented.

Digvijay_Singh

It appears that you want chart to respond on any MonthYear selection dynamically as well as initial prepopulated 3 months data.

I think instead of freezing the duration through calculated dimension, you can have MonthYear as second dimension directly, along with month year filter field  with pre-selected months through select in field action trigger. This way it can take your new changes in month filter in case you want to see other months in the chart.

Anonymous
Not applicable
Author

Hi Digvijay,

Yes you are right. Initially, it should be prepopulated with 3 months data and then upon selection it should dynamically change to show the selected MonthYear.

I dont completely understand your suggestion. Would it be possible to provide an example?