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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
helen_pip
Creator III
Creator III

Add Months to a dimension

Dear Qlikview user

I have a field called Month which I would like to use as the dimension in my chart

My data set spans from May-15 - Sep 16

I would like to place set analysis on my Month dimension so that the dimension only shows the from May-16

Currently I have Month added as a dimension and in the Enable Conditional I have the following

AddMonths($(Min_Start_Date),12)

The Min_Start_Date is the minimum date in the data set

Can anyone help me try to achieve my requirement

3 Replies
Anonymous
Not applicable

Hi Helen,

Have you tried this expression in a calculated dimension instead of a conditional show ?

So, instead of using 'Month' as a dimension, try using 'AddMonths($(Min_Start_Date),12)' as a calculated dimension.

sunny_talwar

You are using the above expression in the Enable condition. This is not where you would want to use this. Try may be using a calculated dimension (this would replace your Month)

If(AddMonths(Min(TOTAL DateField), 1) >= DateField, DateField)

and then select 'Suppress When Value Is Null' on the dimension tab

tracysmart
Creator II
Creator II

should you want to try this without using a calculated dimension (purely for performance gains should it be slow) you could put it inside set analysis as follows

sum({<MyDate={'>=$(vMyDate)'}>}MyColumn)

vMyDate will contain the date you want to show from and in your case is the result of AddMonths($(Min_Start_Date),12). 

you will need to put in all your expressions to limit them all.