Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
pgalvezt
Specialist
Specialist

Field Week Problem

Hi,

I try to concatenate my week field into the calendar but I can't get to expect.

I attached an example (I have 2 calendars one of them dont have weeks.. Excel file has.: PROBLEM is commented...

Thanks!

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Not sure how the Excel file helps here in understanding your issue, since you don't load from an Excel file in your script, do you?

If this doesn't work for you

Left Join(Remuneraciones)

//CalendarioFiltro:

LOAD //[Año Contable Filtro],

    [Semana Contable Filtro]  as Semana,

    //[Mes Contable Filtro],

    [Año Contable Filtro] & [Mes Contable Filtro] as LlaveCalendario

FROM

(qvd);

You need to check your created key, i.e.   [Año Contable Filtro] & [Mes Contable Filtro], and compare these values to the existing key value: 2016_feb

I would guess that you need a underscore:

Left Join(Remuneraciones)

//CalendarioFiltro:

LOAD

    [Semana Contable Filtro]  as Semana,

   [Año Contable Filtro] & '_' & [Mes Contable Filtro] as LlaveCalendario

FROM

(qvd);


View solution in original post

5 Replies
swuehl
MVP
MVP

Not sure how the Excel file helps here in understanding your issue, since you don't load from an Excel file in your script, do you?

If this doesn't work for you

Left Join(Remuneraciones)

//CalendarioFiltro:

LOAD //[Año Contable Filtro],

    [Semana Contable Filtro]  as Semana,

    //[Mes Contable Filtro],

    [Año Contable Filtro] & [Mes Contable Filtro] as LlaveCalendario

FROM

(qvd);

You need to check your created key, i.e.   [Año Contable Filtro] & [Mes Contable Filtro], and compare these values to the existing key value: 2016_feb

I would guess that you need a underscore:

Left Join(Remuneraciones)

//CalendarioFiltro:

LOAD

    [Semana Contable Filtro]  as Semana,

   [Año Contable Filtro] & '_' & [Mes Contable Filtro] as LlaveCalendario

FROM

(qvd);


pgalvezt
Specialist
Specialist
Author

since you don't load from an Excel file in your script, do you?


R: I do... I load the file excel and I use semana column...


Let me check your answer and let you know ..


Thanks!

swuehl
MVP
MVP


R: I do... I load the file excel and I use semana column...

Hm, can't see an excel table source in your script. But may have just missed it, never mind.

Colin-Albert
Partner - Champion
Partner - Champion

This post may help Redefining the Week Numbers

When using week numbers the year associated with the week number can differ from the calendar year.

Week 1 can start in December and the last week of the year, week 52/53 can continue into January.

Perhaps this is why you have problems matching the calendars.

pgalvezt
Specialist
Specialist
Author

Wow so simple! too many code in my script I guess ... Thanks swuehl