Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Every one,
I have a Linear Chart and I want in my X Axis show only the data for Last 6 Months.
I had use this Formula:
aggr(
If(
Date(MonthStart([%Datum])) >= Date(MonthStart(AddMonths(Max([%Datum]), -5))) and Date(MonthStart([%Datum])) <= Date(MonthStart(Max([%Datum]))),
[%Datum]
),
[%Datum]
)
but it does not work. Can any one help me pleaseeeee?
Thanks in advanced
Your expression is almost there just try to fit below. I’m using Today()
aggr(
If(
Date(MonthStart([%Datum])) >= Date(MonthStart(AddMonths(Today(), -5)))
and Date(MonthStart([%Datum])) <= Date(MonthStart(Today())),
[%Datum]
),
[%Datum]
)
If you have already measure since you are designing in chart, I will recommend to restrict in expression to avoid bad performance. Example,
{<[%Datum]={>=AddMonths(Max([%Datum]), -5)<=Max([%Datum])}>}
thanks a lot for your answer it was that you write is not Dimension its measure I think! and when I write in my Dimension its show me the error unfortunately 😞
Your expression is almost there just try to fit below. I’m using Today()
aggr(
If(
Date(MonthStart([%Datum])) >= Date(MonthStart(AddMonths(Today(), -5)))
and Date(MonthStart([%Datum])) <= Date(MonthStart(Today())),
[%Datum]
),
[%Datum]
)