Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
nagireddy_qv
Creator II
Creator II

date and week/month field selection

Hi,

I have a calendar with the below fields. The data seems to be weekly based however user should be able to select date field and week/month field in the UI.

LOAD CalendarId,

     WeekNumber,

     MonthlyPeriod,

    PeriodNo,

     Quarter,

     ref_WeekStrart,

    ref_WeekEnd

FROM xyz

How can i create Date field & Week/Month fields from the above fields?

2 Replies
MarcoWedel

do you have some sample data of your source xyz?

johnw
Champion III
Champion III

So this is your calendar, you have one record per week, and you would like one record per date? I think this would expand your weeks out.

LOAD
CalendarId,
WeekNumber,
MonthlyPeriod,
PeriodNo,
Quarter,
ref_WeekStart+iterno()-1 as Date
FROM xyz
WHILE iterno() <= 7

;

I'm unclear what sort of data is in these fields, or what sort of data you want in your new Week/Month field (fields?), so I'll wait for more info on those.