Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Greetings,
i need some help with my dimension Month.
The thing is that i want to limit my dimension month only to the one selected and the 2 before that one.
i have something like this but is something wrong
if (dsc_mes = {>=$(=max(dsc_mes),-3)<=$(=max(dsc_mes))>}, dsc_mes, ' ')
Regards
Simão Ribeiro
if (dsc_mes<=Num(month(Today())) and dsc_mes >= Num(addmonth(today(),-2)), dsc_mes , null)
then check the "suppress when value is null" box
let me knoew
I think instead of doing this on Month itself, you should try doing this on MonthYear field. May be this:
Aggr(Only({1<MonthYear = {"$(='>=' & MonthName(AddMonths(Max(MonthYear), -2)) & '<=' & MonthName(Max(MonthYear)))"}>} dsc_mes), dsc_mes)
Where MonthYear field is created in the script like this:
MonthName(DateField) as MonthYear
Hi,
Try to use your condition in your expression.
you cannot use set Analysis without an Aggregation function
you can use
if (dsc_mes >=addmonths(max(dsc_mes),-3) and dsc_mes<=max(dsc_mes), dsc_mes, null())
maybe this doesnot work
then you can define a variable with vMaxMonth = max(dsc_mes) and use variable in your calculated Dimension
if (dsc_mes >=addmonths(vMaxMonth),-3) and dsc_mes<=vMaxMonth,dsc_mes, null())
Hi,
Maybe this can help you:
1. With this select for example the sales of currently month:
sum( {$<Month = {$(=Only(Month))}>} Sales )
2. With this select the sales for the previous month in relation to the current selection:
sum( {$<Month= {$(=Only(Month)-1)}>} Sales )
Regards
Hugo