Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Welcome to Qlik Community! Check out our new navigation! FIND OUT MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ecabanas
Creator II
Creator II

Load Script error

Hi I could not run this code of my scrip, could you help to me?

Thank's

CONTADOR_COMPRAS:

LOAD *, floor('$(vminmonth)') as DATEFINANCIAL_CONTADOR,

AutoNumber(floor('$(vminmonth)')&'-'&CUSTACCOUNT_CONTADOR) AS LINK ;

LOAD

          COUNT(DISTINCT SALESID) AS CONTADOR_COMPRAS,

    CUSTACCOUNT_LINE AS CUSTACCOUNT_CONTADOR,

    ApplyMap('Recurrency',(COUNT(DISTINCT SALESID))) AS RECURRENCY

    GROUP BY CUSTACCOUNT_LINE

    RESIDENT INVENTTRANS WHERE DATEFINANCIAL_LINE<='$(vminmonth)';

1 Solution

Accepted Solutions
stephencredmond
Luminary Alumni
Luminary Alumni

Hi,

Your GROUP BY clause should be after the RESIDENT:

CONTADOR_COMPRAS:

LOAD *, floor('$(vminmonth)') as DATEFINANCIAL_CONTADOR,

AutoNumber(floor('$(vminmonth)')&'-'&CUSTACCOUNT_CONTADOR) AS LINK ;

LOAD

          COUNT(DISTINCT SALESID) AS CONTADOR_COMPRAS,

    CUSTACCOUNT_LINE AS CUSTACCOUNT_CONTADOR,

    ApplyMap('Recurrency',(COUNT(DISTINCT SALESID))) AS RECURRENCY

    RESIDENT INVENTTRANS WHERE DATEFINANCIAL_LINE<='$(vminmonth)'

    GROUP BY CUSTACCOUNT_LINE;

Regards,

Stephen

Stephen Redmond is author of QlikView for Developer's Cookbook

He is CTO of CapricornVentis a QlikView Elite Partner. We are always looking for the right people to join our team.

Follow me on Twitter: @stephencredmond

View solution in original post

4 Replies
stephencredmond
Luminary Alumni
Luminary Alumni

Hi,

Your GROUP BY clause should be after the RESIDENT:

CONTADOR_COMPRAS:

LOAD *, floor('$(vminmonth)') as DATEFINANCIAL_CONTADOR,

AutoNumber(floor('$(vminmonth)')&'-'&CUSTACCOUNT_CONTADOR) AS LINK ;

LOAD

          COUNT(DISTINCT SALESID) AS CONTADOR_COMPRAS,

    CUSTACCOUNT_LINE AS CUSTACCOUNT_CONTADOR,

    ApplyMap('Recurrency',(COUNT(DISTINCT SALESID))) AS RECURRENCY

    RESIDENT INVENTTRANS WHERE DATEFINANCIAL_LINE<='$(vminmonth)'

    GROUP BY CUSTACCOUNT_LINE;

Regards,

Stephen

Stephen Redmond is author of QlikView for Developer's Cookbook

He is CTO of CapricornVentis a QlikView Elite Partner. We are always looking for the right people to join our team.

Follow me on Twitter: @stephencredmond

ecabanas
Creator II
Creator II
Author

GREATTT Thank's

But I have a Question, I did this calculation from a resident to do it fast, but unfortunately is slower than to attack the DDBB, You know why??

Thank's

Eduard

stephencredmond
Luminary Alumni
Luminary Alumni

Hi,

Yes, that can happen with Resident.  Sometimes, you might find it quicker to Store your table to QVD and then load the next step from the QVD instead of using Resident.

Regards,

Stephen

Stephen Redmond is author of QlikView for Developer's Cookbook

He is CTO of CapricornVentis a QlikView Elite Partner. We are always looking for the right people to join our team.

Follow me on Twitter: @stephencredmond


ecabanas
Creator II
Creator II
Author

I'm gonna do that!!! thank's Stephan