Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
scotly-victor
Creator II
Creator II

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

fiscal month.png

can anyone help?

8 Replies
sunny_talwar

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))))

scotly-victor
Creator II
Creator II
Author

Sorry, still same error

phaneendra_kunc
Partner - Specialist III
Partner - Specialist III

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.

sunny_talwar

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

scotly-victor
Creator II
Creator II
Author

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

This is my expression

scotly-victor
Creator II
Creator II
Author

Sorry ,Issue still persist

scotly-victor
Creator II
Creator II
Author

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

phaneendra_kunc
Partner - Specialist III
Partner - Specialist III

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