3 Replies Latest reply: Mar 15, 2016 1:34 AM by Avinash R

# Calculated dimensions and variables

Hi ;

I have a bar graph with the following calculated dimension:

=if([Report Type]='Daily Report',[Carrier Alt Carrier Designator],

if([Report Type]='Weekly Report',[YearWeek],

if([Report Type]='Monthly Report',[DropMonth],

My expression is as follows:

If l select, report type 'Weekly report' , my dimension on the graph is [YearWeek] which is correct.

I have also created 2 variables, vmaxPeriod (calculated as max(YearWeek)) and vmaxPeriod_3 (calculated as max(YearWeek)-3).

I now want to limit dimensions displayed i.e. vMaxPeriod_3<=YearWeek<=vMaxPeriod.

How do l do this? Please assist.

Regards;

Moses

• ###### Re: Calculated dimensions and variables

Try like this

// In dimension

=if([Report Type]='Daily Report',[Carrier Alt Carrier Designator],

if([Report Type]='Weekly Report' and [YearWeek]>=vMaxPeriod_3 and [YearWeek]<=vMaxPeriod,[YearWeek],

if([Report Type]='Monthly Report',[DropMonth],