Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, i need to use the autogenerate statement to populate a numeric field, but i have noticed that on high number of rows (99999999) the command fails, is it possible?
Thanks
Marco
Well, it you see it fail then yes it's possible that it fails. A 100 million records isn't a small amount. Are you sure you're machine isn't running out of ram? Perhaps you should try something other then Qlik Sense to generate the data for you. A perl/python/php/... script or perhaps excel.
Ok, and I have also another question, these statement don't produce any table what's wrong?
SET m_data_inizio_previsione = Date(Max([Data Decorrenza]) + 1);
SET m_nAnni = 5;
SET m_dt_start = num(Date($(m_data_inizio_previsione),'DD/MM/YYYY'));
SET m_dt_end = num(Date($(m_data_inizio_previsione) + (365*m_nAnni),'DD/MM/YYYY'));
SET m_dt_numRows = ($(m_end)-$(m_start)) + 1;
Data_previsione_table:
Load
Date(($(m_dt_start) + (Rowno()-1))) AS Data_previsione
Autogenerate $(m_dt_numRows);
SET m_data_inizio_previsione = Date(Max([Data Decorrenza]) + 1)
The Max function can't reference data from a field outside a load statement.
You first need to create a table that contains that maximum date value and then you use the peek function to retrieve it from that table. You can find an example here: Creating A Master Calendar
To make live easier you can use the Qlikview Components script library (works in Qlik Sense too) to create a calendar for you. See this tutorial: Tutorial - Using Common Date Dimensions and Shared Calendars