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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Loop script error

Hi, I am trying to create a loop that would count based on the current quarter going back every 12 quarters until it hits #12. 35 being the current QuarterID.

However, it keeps giving me an error that vMAXQuarterID is not valid. I have set the variables on the main tab as :

Set vMAXQuarterID     = '35';

Set vMINQuarterID    = '12';

Loop scripts:

Load

   

    '$(vMAXQuarterID)' -12                                as '3_Year_Key',

    Autogenerate 1,

   

    while IterNo() <= '35' and QuarterID >= '12';

Load Distinct   

    Autonumber(Year_Qtr,'QtrID')                        as QuarterID,

    Autonumber(Fiscal_Year,'YearID')                    as YearID,

    Autonumber(Fiscal_Mth,'MonthID')                    as MonthID,

    *;

Can someone help please?

TIA

0 Replies