Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi
i am trying to show current month vs previous month in bar chart
what i did is
sum({<FiscalPeriod={$(=max(FiscalPeriod)),$(=max(FiscalPeriod)-1)}>}Customer)
it shows maximum month and previous month
how can i show current vs previous month any help?
any help?
Hi:
If Month field only contain the month part of a date such as Jan, Feb, Mar, I guess Max(Month) will show you Dec.
Your FiscalPeriod field only have Month number from 1 to 12. So I am thinking Max(FiscalPeriod) will give you 12.
Let's say you have a full date field called FullDate.
If you use MonthStart(FullDate) AS MonthStart, it will give you the first date of the month.
For example, any dates in September 2014 will give you 01/09/2014. Any dates in September 2013 will give you 01/09/2013. In that case, you can select the current month record by selecting 01/09/2014 in MonthStart field only.
I think then you can use the following:
Sum({<MonthStart={$(=MonthStart(Today()))), $(=MonthStart(AddMonths(Today(),-1)))} >} Customer)
And change the Dimension to MonthStart.
Thank you.
PC
If you don't want to change your script, I don't think you can select current month by using only FiscalPeriod in your set analysis.
Try to add the FiscalYear as well. Like FiscalYear = Year(Today())
Thank you.
PC
Try this,
if you are looking for Current and previous month,
sum({<FiscalPeriod={$(=max(Num(Month(Date(Today()))))),$(=max(Num(Month(Date(Today()))))-1)}>}Customer)
thank you every one....![]()