8 Replies Latest reply: May 4, 2016 1:26 PM by Phaneendra Kunche

# conditional dimension in line chart

Hi all ,

I have conditional dimension in line chart.

If(DateTemp1 = 'YTD',FiscalMonth,

if(DateTemp1 = 'QTD',FiscalMonth,

IF(DateTemp1='MTD',[Day (#)],

IF(DateTemp1='WTD',[Day (#)]))))

I have list box with YTD,QTD,MTD,WTD .

When I select YTD ,QTD    no issue, Fiscal Month displays.

When I select MTD,WTD Output would be like this

can anyone help?

• ###### Re: conditional dimension in line chart

What happens if the order of the if statement is changed?

IF(DateTemp1='MTD',[Day (#)],

IF(DateTemp1='WTD',[Day (#)],

IF(DateTemp1='YTD',FiscalMonth,

IF(DateTemp1='QTD',FiscalMonth))))

• ###### Re: conditional dimension in line chart

Sorry, still same error

• ###### Re: conditional dimension in line chart

Would you be able to share the data behind this dimensions? I will give it a try to test it out

• ###### Re: conditional dimension in line chart

sum({<type={'Order'},FiscalYear={\$(=max(FiscalYear))} >} Sales)

This is my expression

• ###### Re: conditional dimension in line chart

I have used list box for selection YTD,QTD,MTD,WTD(INLINE CODE)

• ###### Re: conditional dimension in line chart

How did you define your DAY #?

If(DateTemp1 = 'YTD',FiscalMonth,

if(DateTemp1 = 'QTD',FiscalMonth,

IF(DateTemp1='MTD',Date([Day (#)],'DD'),

IF(DateTemp1='WTD',Date([Day (#)],'DD'))))

if above doesn't work convert your Day # in this format in script.

Text((Date(Today(),'DD'))) as [Day (#)]

Replace "Today()" with your field from datamodel.

• ###### Re: conditional dimension in line chart

Sorry ,Issue still persist

• ###### Re: conditional dimension in line chart

Can you share you QVF with us? Above approaches should work, unless we are missing something here.