Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

paulyeo11
Valued Contributor II

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

Re: How to make My Box 2 Display YrMthWk ?

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
Valued Contributor II

Re: How to make My Box 2 Display YrMthWk ?

Hi All

Enclosed My QV Doc

Employee
Employee

Re: How to make My Box 2 Display YrMthWk ?

Further reading QlikView Quoteology

Employee
Employee

Re: How to make My Box 2 Display YrMthWk ?

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
Valued Contributor II

Re: How to make My Box 2 Display YrMthWk ?

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

Employee
Employee

Re: How to make My Box 2 Display YrMthWk ?

it seems to be working here

Capturar.PNG

paulyeo11
Valued Contributor II

Re: How to make My Box 2 Display YrMthWk ?

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

Employee
Employee

Re: How to make My Box 2 Display YrMthWk ?

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
Valued Contributor II

Re: How to make My Box 2 Display YrMthWk ?

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

Community Browser