Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

How to make My Box 2 Display YrMthWk ?

Hi All

I have and field name = Data Type at Box 1 :-

LOAD * INLINE [

Date Type, Column2

year,year

yr_jp,yr_jp

YrWk,YearWeek

YearQtr,YearQtr

YearHalf,YearHalf

Yr_Qtr_jp,Yr_Qtr_jp

YrMth,YearMonth

YrMthWk,YearMonthWeek

  ];

I have a Box 2 with below expression :-

=IF([Date Type]='year','Year',

IF([Date Type]='Yr','year',

IF([Date Type]='YrMth','Yr Mth',

IF([Date Type]='YearMonthWeek','YrMthWk',

IF([Date Type]='YearQtr','Yr Qtr'

)))))

My Question is why Box 2 not display YrMthWk ?

Paul

11 Replies
Clever_Anjos
Employee
Employee

It would be easier if you post your app,

Try do this

=IF([Date Type]='year',[Year],

IF([Date Type]='Yr',[year],

IF([Date Type]='YrMth',[Yr Mth],

IF([Date Type]='YearMonthWeek',[YrMthWk],

IF([Date Type]='YearQtr',[Yr Qtr]

)))))

paulyeo11
Master
Master
Author

Hi All

Enclosed My QV Doc

Clever_Anjos
Employee
Employee

Further reading QlikView Quoteology

Clever_Anjos
Employee
Employee

Try this

=IF([Date Type]='year',[Year],

IF([Date Type]='Yr',[year],

IF([Date Type]='YrMth',[YearMonth],

IF([Date Type]='YearMonthWeek',[YearMonthWeek],

IF([Date Type]='YearQtr',[YearQtr]

)))))

paulyeo11
Master
Master
Author

Hi Clever

Thank you very much for your sharing.

I have try your propose script.

But it return wrong value.

I have enclosed my QV Doc.

Paul

Clever_Anjos
Employee
Employee

it seems to be working here

Capturar.PNG

paulyeo11
Master
Master
Author

Hi Clever

What I want is make Box 2 display 4 field from Box 1 .

I manage to display 3 field at Box 2. But I am unable to make field YearMonthDay display at Box 2.

Paul

Sent from my iPhone

Clever_Anjos
Employee
Employee

Please try this expression

=IF([Date Type]='year',[Year],

IF([Date Type]='Yr',[year],

IF([Date Type]='YrMth',[YearMonth],

IF([Date Type]='YearMonthWeek',[YearMonthWeek],

IF([Date Type]='YearQtr',[YearQtr],

IF([Date Type]='yr_jp',[yr_jp],$(=only([Date Type]))

))))))

paulyeo11
Master
Master
Author

Hi Clever

Thank you for your reply. it still not get what i want. look like some thing wrong with my Doc. As some one also suggest the same script. also not work.

Paul