Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I need to show last 13 months sales in bar chart when a date is selected, but
1. when the selected date is month end of the selected date like(3/31/2017) i need to show current month and last 12 months (From Feb 16 to including Mar 17)
2. when the selected date is weekend of the selected month like (4/30/2017) i need to show current month and last 12 months also (From Mar 16 to Apr/28/2017)
I know how to show last 13 months sales using Monthstart and Addmonths functions, but i need help for these two conditions
Thanks in advance.
May be this? I am sure, this should work
=If(GetFieldSelections(DateField) = '$(=MonthEnd(GetFieldSelections(DateField)))', Sum({<DateField = {">=$(=AddMonths(Max(DateField),-13)) <=$(=Max(DateField))"}>}Sales), Sum({<DateField = {">=$(=AddMonths(Max(DateField),-13)) <$(=Max(DateField))"}>}Sales))
Here, If you select 14-Apr-2017 Then what you are expecting for Role Month? Does this you need Mar 16 - Apr 17??
Hi Anil
If i select 14-Apr-17, then chart needs to show from 01-Mar-2016 to 31-Mar-17( last 13 months).
Need help on this..
Thanks
May be this? I am sure, this should work
=If(GetFieldSelections(DateField) = '$(=MonthEnd(GetFieldSelections(DateField)))', Sum({<DateField = {">=$(=AddMonths(Max(DateField),-13)) <=$(=Max(DateField))"}>}Sales), Sum({<DateField = {">=$(=AddMonths(Max(DateField),-13)) <$(=Max(DateField))"}>}Sales))
Hi Anil,
its working in one scenaio, iam building on that one.
Thanks for your help.