Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
stephenedberkg
Creator II
Creator II

Show next 21 month sales

if i select the 2013  jan mean i want to show next 21 month sales values in line chart

13 Replies
jpenuliar
Partner - Specialist III
Partner - Specialist III

You will have a Start Date and End Date:

Example: StartDate = Today()

               EndDate = Month(AddMonths(Today(),21))

jpenuliar
Partner - Specialist III
Partner - Specialist III

If you save your Date range in variables, your expression can be:

=Sum({<Date_Field = {'>=$(=date($(vStartDate)))<=$(=date($(vEndDate)))'}>}Sales)

stephenedberkg
Creator II
Creator II
Author

Thank you for your reply

i want this calculation in dimension. i have master calender  also

jpenuliar
Partner - Specialist III
Partner - Specialist III

you can use your Date Range to a "Select in Field" action, making it visible in your current selection box, or you can use it for your calculated Dimension.

jpenuliar
Partner - Specialist III
Partner - Specialist III

Maybe something like below for your calculated dimension

=if(Date >= vStart_Date and Date <= vEnd_Date,Date)

stephenedberkg
Creator II
Creator II
Author

Dear Jonathan Penulier,

i want to show the next 21 month from current month.can i change is it in script?

jpenuliar
Partner - Specialist III
Partner - Specialist III

in the load Script? of course you can,

add a Where clause on your Date field with your Date range.

stephenedberkg
Creator II
Creator II
Author

can you tell that syntax of this

jpenuliar
Partner - Specialist III
Partner - Specialist III

When you say Current month,  you mean this month correct? so I am thinking, what data can you load from your source for the next 21 months?

You see my logic there, how can you load for example the next 21 months transactions if it hasn't happen yet?