Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to add 2 months to the current date?

Hi,

I am trying to figure out how to add 2 months to an expression but only show the current dates in the dimensions. For example, for June, I need to show data in August because of a 60 day grace period. Can someone show me how I can do this without showing August in the dimensions for June.

Please let me know if you need further clarification to answer this question.

Thank you,

Saurav

3 Replies
Not applicable
Author

Hi Saurav S

Can you try Addmonths(today(),2), which gives you your expecting result.

hope this helps

thank you

Meher

Not applicable
Author

Hi Merwan,

Sorry I forgot to mention. I have already done addmonths in my script but in the dimensions I do not need to see July and August in June. I believe showing the future months will confuse the end users. Do you think there is a solution?

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

This is what I would try:

  • Create a date island with the date and grace date, something like:    

               DateIsland:

               LOAD

                    TransDate As diDate,

                    AddMonths(TransDate, 2) As diGraceDate

               Resident Data;

  • Dimension the chart/table using diDate
  • Filter the amounts using GraceDate, an expression something like

    

               Sum(If(TranDate < diGraceDate, Value))

          or

               Sum(If(Month(TranDate) = Month(diGraceDate), Value))

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein