Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

EMCK
New Contributor

Two different calendar weeks in one dashboards

Hi all,

I need to include two diffenrent types of calendar week in one Dashboard: First the regular calendar from Monday to Sunday, second a markenting calendar from Thusday to Friday. 

In the end I need two textboxes: The first with the regular Calender weeks (1-52) and a second box with the marketing calender weeks (1-52). The user should be able to choose one or the other calendar week type.

 

Does anyone have an idea how to implement that?

 

Thanks a lot and best regrads

Emck

4 Replies
richard_chilvers
Valued Contributor

Re: Two different calendar weeks in one dashboards

Hi

Can you better explain your Marketing calendar? What do you mean "fromThursday to Friday" ? Do you mean from Friday to Thursday?

EMCK
New Contributor

Re: Two different calendar weeks in one dashboards

Sorry, you're right: The Marketing Calender goes from Friday to Thursday, of course.

richard_chilvers
Valued Contributor

Re: Two different calendar weeks in one dashboards

Hi

Try using the Week function with a first_week_day parameter.

Usually the default is for Monday to be the first day of the week. If you set first_week_day to 4, the week will start on Friday.

QVCapture.JPG

Your script will be something like :

Dates:

LOAD Date ......;

Regular_Calendar:

LOAD

Date,

Week(Date) AS Regular_Week_No

RESIDENT Dates;

Marketing_Calendar:

LOAD

Date,

Week(Date,4) AS Marketing_Week_No

RESIDENT Dates;

Support
Support

Re: Two different calendar weeks in one dashboards

Did Richard's last post solve your issue?  If so, be sure to give him credit by clicking on the Accept as Solution button, and if you are not able to do that, just leave a reply for us letting us know that did help, and we can mark things for you.  Otherwise we will need some further details as to where you are with things.

Regards,
Brett

To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.