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

Set analysis selected year, month, week; show last 13 thirteen weeks

Hello,

hopefully anyone can help me.

I want to create a chart for sales in which is shown salesvalues per week based on timescale selected week till selected week -/- 13 weeks.

Sum( {$<FiscalYear=, FiscalQuarter=, CalMonth=, CalWeek=, CalDay=, SSC_CODE={'02'}, AGL_APOTHEEK_AGB={'8755'} >} BR_SALES_AMOUNT)

When I use the definition above the selected date isn't important. It is excluded but I want the results based on the selected date.

Is there a simple solution?

Many thanks in advance,

Bas



2 Replies
Not applicable
Author

Make a separated calendar (that includes every days) and use it as selection.

Use a condition between the date of the calendar and the date of your data.

Something like this :


sum(if(MyDate >= weekstart(Date - 13 * 7) and MyDate <= weekend(Date), Value))


Where "MyDate" is the date linked to the values and "Date" are the date linked to the calendar.

<<see attached file: "Show last 13 months.qvw">>.

Not applicable
Author

I can't upload the file with the forum Sad

Here is an external link :

http://www.megaupload.com/?d=X6X9V8ZI