Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Chanty4u
Champion III
Champion III

RE:Script error

hi all,

I hve master calender when i am usng innerjoin it shwng error......

y it is shwng error in temp calender?

1 Solution

Accepted Solutions
jagan
MVP & Luminary
MVP & Luminary

Hi,

Try like this

Data:

SELECT

Field1,

Field2,

Sum(Field3) AS Field3,

Sum(Field4) AS Field4

FROM TableName

Group By Field1, Field2;

View solution in original post

18 Replies
tamilarasu

Hi Suresh,

Could you post your script or application.?

Chanty4u
Champion III
Champion III
Author

MinMax:

Load

Max(Date) as MaxDate,

Min(Date) as MinDate

Resident TASKDETAILS;

// Creating Date Variables

Let vMinDate=Num(Peek('MinDate',0,'MinMax'));

Let vMaxDate=Num(Peek('MaxDate',0,'MinMax'));

Let vToday = $(vMaxDate);

Drop Table MinMax;

// TEMPORARY CALANDER

TempCal:

Load

     Date($(vMinDate)+ RowNo() -1) as TempDate

     AutoGenerate $(vMaxDate) - $(vMinDate) +1;

    

//*****Master Calender*****

MasterCalender:

Load

TempDate as Date,

    Year(TempDate) as Year,

    Month(TempDate) as Month,

    Day(TempDate) as Day,

    Week(TempDate) as Week,

    WeekEnd(TempDate) as WeekEnd,

    'Q' &Ceil(Month(TempDate)/3) as Quarter,

    Date(MonthStart(TempDate),'MMM-YYYY') as MonthYear,

    InYearToDate(TempDate,$(vToday),0) *-1 as CurYTDFlag,

    InYearToDate(TempDate,$(vToday),-1) *-1 as LastYTDFlag

    Resident TempCal;

Drop Table TempCal;

tamilarasu

The above script works for me. Where is your inner join.?

simospa
Partner
Partner

Hi,

the script you posted works for me too.

What kind of error are you getting?

S.

Chanty4u
Champion III
Champion III
Author

that is calender

below is script

TASKDETAILS:

LOAD

    PROJECT_NUMBER,

    TASK_PROJECT_DESC AS PROJECT_DESC,

    TASK_CODE AS TSK_TASK_CODE,

    TASK_NAME AS  TSK_TASK_NAME,

//     TARGET_START_DATE,

//     TARGET_END_DATE,

//     EARLY_START_DATE,

//     EARLY_END_DATE,

//    ACT_START_DATE,

//    ACT_END_DATE,

    COMPONENTS as TSK_COMPONENTS,

    COMPONENT_DESCRIPTION as TSK_COMPONENT_DESCRIPTION,

    COST_CODE,

    PHYS_COMPLETE_PCT as TSK_PHYS_COMPLETE_PCT,

    TASK_ID as TSK_TASK_ID,

    PROJ_ID,

    PROD_SUPERVISOR_CODE,

    PROD_SUPERVISOR_NAME,

    DISCIPLINE_CODE,

    DISCIPLINE_ID,

    DISCIPLINE_NAME,

    FACILITY_CODE,

    FACILITY_NAME,

    LOCATION_CODE,

    MAIN_COMP as TSK_MAIN_COMP,

    MAIN_COMP_DESC as  TSK_MAIN_COMP_DESC ,

    MILESTONE as TSK_MILESTONE,

    PROGRESS_AS_OF_CURRENT_MONTH,

    PROGRESS_AS_OF_LAST_MONTH,

    BASE_START_DATE as Date,

    'Bstart' as TransType,

     BASE_START_DATE

   // BASE_END_DATE

FROM [lib://Project Apps/PPROGRESS_P6TASK_Details_V.qvd]

(qvd);

FIRST TABLE

TASKDETAILS1:

INNER JOIN(TASKDETAILS)

LOAD

    PROJECT_NUMBER,

    TASK_PROJECT_DESC AS PROJECT_DESC,

    TASK_CODE AS TSK_TASK_CODE,

    TASK_NAME AS  TSK_TASK_NAME,

//     TARGET_START_DATE,

//     TARGET_END_DATE,

//     EARLY_START_DATE,

//     EARLY_END_DATE,

//    ACT_START_DATE,

//    ACT_END_DATE,

    COMPONENTS as TSK_COMPONENTS,

    COMPONENT_DESCRIPTION as TSK_COMPONENT_DESCRIPTION,

    COST_CODE,

    PHYS_COMPLETE_PCT as TSK_PHYS_COMPLETE_PCT,

    TASK_ID as TSK_TASK_ID,

    PROJ_ID,

    PROD_SUPERVISOR_CODE,

    PROD_SUPERVISOR_NAME,

    DISCIPLINE_CODE,

    DISCIPLINE_ID,

    DISCIPLINE_NAME,

    FACILITY_CODE,

    FACILITY_NAME,

    LOCATION_CODE,

    MAIN_COMP as TSK_MAIN_COMP,

    MAIN_COMP_DESC as  TSK_MAIN_COMP_DESC ,

    MILESTONE as TSK_MILESTONE,

    PROGRESS_AS_OF_CURRENT_MONTH,

    PROGRESS_AS_OF_LAST_MONTH,

   // BASE_START_DATE,

    BASE_END_DATE as Date,

    'BEnd' as TransType,

     BASE_END_DATE

   

FROM [lib://Project Apps/PPROGRESS_P6TASK_Details_V.qvd]

(qvd);

TASKDETAILS1:

INNER JOIN(TASKDETAILS)

LOAD

    PROJECT_NUMBER,

    TASK_PROJECT_DESC AS PROJECT_DESC,

    TASK_CODE AS TSK_TASK_CODE,

    TASK_NAME AS  TSK_TASK_NAME,

//     TARGET_START_DATE,

//     TARGET_END_DATE,

//     EARLY_START_DATE,

//     EARLY_END_DATE,

//    ACT_START_DATE,

//    ACT_END_DATE,

    COMPONENTS as TSK_COMPONENTS,

    COMPONENT_DESCRIPTION as TSK_COMPONENT_DESCRIPTION,

    COST_CODE,

    PHYS_COMPLETE_PCT as TSK_PHYS_COMPLETE_PCT,

    TASK_ID as TSK_TASK_ID,

    PROJ_ID,

    PROD_SUPERVISOR_CODE,

    PROD_SUPERVISOR_NAME,

    DISCIPLINE_CODE,

    DISCIPLINE_ID,

    DISCIPLINE_NAME,

    FACILITY_CODE,

    FACILITY_NAME,

    LOCATION_CODE,

    MAIN_COMP as TSK_MAIN_COMP,

    MAIN_COMP_DESC as  TSK_MAIN_COMP_DESC ,

    MILESTONE as TSK_MILESTONE,

    PROGRESS_AS_OF_CURRENT_MONTH,

    PROGRESS_AS_OF_LAST_MONTH,

   // BASE_START_DATE,

    BASE_END_DATE as Date,

    'BEnd' as TransType,

     BASE_END_DATE

   

FROM [lib://Project Apps/PPROGRESS_P6TASK_Details_V.qvd]

(qvd);

Chanty4u
Champion III
Champion III
Author

PFA

error

tamilarasu

What is your Date field format (BASE_START_DATE).? Seems the Min and max date not taken properly.

simospa
Partner
Partner

Hi,

in this line

Date($(vMinDate)+ RowNo() -1) as TempDate

AutoGenerate $(vMaxDate) - $(vMinDate) +1;

it seems that the two variables are empty. You can see that even in TASKDETAILS 0 rows are fetched.

So the issue, in my opinion, is not on calendar part of script but in TASKDETAILS joins.

S.

skusuma1991
Creator
Creator

Hi suresh,

How can we run this script?specify the error which you are getting in detail.