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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

Cross Table

Hi Friends

PROFIT:

CrossTable(DESCRIPTION, ACTUAL, 4)

LOAD BAL_BRANCH_CODE AS BCOD,

     YEAR,

     MONTH,

     CLA_CODE,

     GROSS_PREMIUM,

     CEDED_PREMIUM,

        NET_PROFIT

FROM

Actual_TB.Qvd

(qvd)

WHERE BAL_BRANCH_CODE='1M00'

;

Concatenate(PROFIT)

CrossTable(DESCRIPTION, BUDGET, 4)

LOAD BGT_BRANCH_CODE AS BCOD,

    YEAR,

     MONTH,

     CLA_CODE,

     GROSS_PREMIUM,

     CEDED_PREMIUM,

  

     NET_PROFIT

FROM

Budget_TB.Qvd

(qvd)

WHERE BGT_BRANCH_CODE='1M00';

When I run the above script I get the following error message

llegal combination of prefixes

Concatenate(PROFIT)

CrossTable(DESCRIPTION, BUDGET, 4)

LOAD BGT_BRANCH_CODE AS BCOD,

    YEAR,

     MONTH,

     CLA_CODE,

     GROSS_PREMIUM,

     CEDED_PREMIUM,

Pls help me to solve this problem.

My requirement is to load two cross table and concatenate the same. If you find a better solution pls advice

me

14 Replies
Sokkorn
Master
Master

Hi Upali,

I got your point. Let try this script:

tmpPROFIT:

CrossTable(DESCRIPTION, ACTUAL, 4)

LOAD BAL_BRANCH_CODE AS BCOD,

     YEAR,

     MONTH,

     CLA_CODE,

     GROSS_PREMIUM,

     CEDED_PREMIUM,

     NET_PROFIT

FROM Actual_TB.Qvd (qvd) WHERE BAL_BRANCH_CODE='1M00';

tmpBUDGET:

CrossTable(DESCRIPTION, BUDGET, 4)

LOAD BGT_BRANCH_CODE AS BCOD,

    YEAR,

     MONTH,

     CLA_CODE,

     GROSS_PREMIUM,

     CEDED_PREMIUM,

     NET_PROFIT

FROM Budget_TB.Qvd (qvd) WHERE BGT_BRANCH_CODE='1M00';

[FinalTable]:

LOAD * Resident [tmpPROFIT];

Concatenate([FinalTable])

LOAD * Resident [tmpBUDGET];

DROP Tables [tmpPROFIT],[tmpBUDGET];

Regards,

Sokkorn

upaliwije
Creator II
Creator II
Author

Tks Max

Then I get the following Syn Table Message

Actual_TB << Actual_TB 20 lines fetched

ACTUAL << Actual_TB 540 lines fetched

Budget_TB << Budget_TB 13 lines fetched

BUDGET << Budget_TB 351 lines fetched

ACTUAL << ACTUAL 1,080 lines fetched

BUDGET << BUDGET 702 lines fetched

DROP TABLES ACTUAL,BUDGET

$Syn 1 = BCOD+YEAR+MONTH+CLA_CODE+DESCRIPTION

upaliwije
Creator II
Creator II
Author

Hi

Still I have this Syn Table Problem with Following Message

DROP TABLES ACTUAL,BUDGET

$Syn 1 = BCOD+YEAR+MONTH+CLA_CODE+DESCRIPTION

Sokkorn
Master
Master

Hi Upali,

What about this way

tmpPROFIT: 

CrossTable(DESCRIPTION, ACTUAL, 4) 

LOAD BAL_BRANCH_CODE AS BCOD, 

     YEAR, 

     MONTH, 

     CLA_CODE, 

     GROSS_PREMIUM, 

     CEDED_PREMIUM, 

     NET_PROFIT 

FROM Actual_TB.Qvd (qvd) WHERE BAL_BRANCH_CODE='1M00'; 

 

tmpBUDGET: 

CrossTable(DESCRIPTION, BUDGET, 4) 

LOAD BGT_BRANCH_CODE AS BCOD, 

    YEAR, 

     MONTH, 

     CLA_CODE, 

     GROSS_PREMIUM, 

     CEDED_PREMIUM, 

     NET_PROFIT 

FROM Budget_TB.Qvd (qvd) WHERE BGT_BRANCH_CODE='1M00'; 

 

[FinalTable]:

NoConcatenate

LOAD * Resident [tmpPROFIT];

DROP Table [tmpPROFIT];

Concatenate([FinalTable]) 

LOAD * Resident [tmpBUDGET]; 

DROP Table [tmpBUDGET];

Regards,

Sokkorn

upaliwije
Creator II
Creator II
Author

Thanks All