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

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
Domino1
Contributor II
Contributor II

How to calculate specific month for next 10 years in load script ?

 Hello,

Here are my date values.

MonthNumber : 01, 02, 03, 04, 05, 06, 07, 08, 09, 10,11,12

FiscalYear: 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031, 2032, 2033

Expression : sum (sales) 

How do I calculate a column in the data load that returns sum (sales) for MonthNumber =09 for the next 10 years ?

Labels (2)
1 Reply
BrunPierre
Partner - Master II
Partner - Master II

Hi, like this perhaps.

NoConcatenate
Data:
LOAD FiscalYear,
MonthNumber,
Sum(Sales) as Sales

Resident SourceTable
Where (FiscalYear >= Year(Today()) and FiscalYear <= Addyears(Today(),10))
and
MonthNumber = '09'

Group By FiscalYear, MonthNumber;

DROP Table SourceTable;