Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us for a live Q&A! September 21, 10 AM ET - Onboarding Fast in Qlik Sense SaaS! REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get the number of week per month?

Edit by Community Team member:

Please post in English unless posting in a language specific section.

Post translated by Google translate.

---

Hello community, I doubt as I get the week number of the month but that is in the current selection.

now it appears so,

Sin título.png

He would be shown grouped by month the number of week.

3 Replies
swuehl
MVP
MVP

Maybe create a straight table chart with dimension Month and as expression

=Count(DISTINCT WeekField)

MarcoWedel

Hi,

maybe helpful:

QlikCommunity_Thread_211271_Pic1.JPG

QlikCommunity_Thread_211271_Pic2.JPG

table1:

LOAD *,

    Day(Date) as Day,

    Date(SetDateYear(Date,2016),'DD MMM') as DayMonth,

    WeekDay(Date) as WeekDay,

    Week(Date) as Week,

    WeekName(Date) as WeekName,

    AutoNumber(Week(Date),MonthName(Date)) as MonthWeek,

    Month(Date) as Month,

    MonthName(Date) as MonthName,

    Year(Date) as Year,

    WeekYear(Date) as WeekYear;

LOAD Date(MakeDate(2000)+IterNo()-1) as Date

AutoGenerate 1

While MakeDate(2000)+IterNo()-1<MakeDate(2017);

Left Join (table1)

LOAD MonthName,

    Max(MonthWeek) as MonthWeeks

Resident table1

Group By MonthName;

regards

Marco

NitinK7
Specialist
Specialist

Hello,

How to calculate week if there situation like month/week start with Saturday or Sunday then  first week should be till second Sunday (skip first Sunday) .

based on below screenshot I need like

Week1-  from 1st May to 9th May

Week2- 10th May to 16th May

Week3- 17th May to 23rd May

week4- 24th May to 31th May  (if only 1 day remaining at last then count this day in previous week. if more than 2 days then count it another week)

NitinK7_0-1628154574206.png