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

Error while creating a calendar table

Dear Experts,

I am creating a Fiscal Calendar table for YTD calculation. Here is the script for the calendar creation:

Set vFM = 10 ;        // First month of fiscal year

Calendar:

Load

  Dual(fYear-1 &'/'& fYear, fYear)  as FYear,          // Dual fiscal year

    Dual(Month, fMonth)                as FMonth,      // Dual fiscal month

          *;

Load

  Year + If(Month>=$(vFM), 1, 0) as fYear,          // Numeric fiscal year

    Mod(Month-$(vFM), 12)+1        as fMonth,          // Numeric fiscal month

          *;

LOAD

  DATE(date_invoice) as date_invoice,

    year(date_invoice) as Year,

    Month(date_invoice) as Month,

    Monthname(date_invoice) as MonthYear

Resident account_invoice;

Everytime i try to load, it throws an

The following error occurred:

Table not found

The error occurred here:

LOAD DATE(date_invoice) as date_invoice, year(date_invoice) as Year, Month(date_invoice) as Month, Monthname(date_invoice) as MonthYear Resident account_invoice

Data has not been loaded. Please correct the error and try loading again.

Could somebody please point out what could be the potential problem?

Thanks

Swetha

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi,

I think account_invoice table is not there in your datamodel, replace it with corresponding table name.

If already there then try to move Calendar script to the end.

Regards,

Jagan.

View solution in original post

4 Replies
sunny_talwar

Have you made sure that you have this table -> account_invoice. You need to make sure that the upper and lower case and spellings are correct.

jagan
Luminary Alumni
Luminary Alumni

Hi,

I think account_invoice table is not there in your datamodel, replace it with corresponding table name.

If already there then try to move Calendar script to the end.

Regards,

Jagan.

Kushal_Chawda

Please check the relevant table name from which you are getting Date_invoice and write the name of that table in resident load

Not applicable
Author

Thanks everyone,

I moved the calendar script to the end and it worked.

Thanks

Swetha