Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
geogou1973
Creator
Creator

Problem with the data in a section access qvw

Hello i have the following script in the Sec Tab

Section Access;

LOAD * INLINE [

ACCESS, NTNAME

ADMIN, DOMAINNAME\USERNAME1

USER, DOMAINNAME\USERNAME2

];

Section Application;

STAR IS *;

LOAD * INLINE [

NTNAME, CSECAR

DOMAINNAME\USERNAME1, *

DOMANINAME\USERNAME2, 10

];       


I have checked also in the Document Properties and the tab Opening the following



Opening.png


In some cases i am losing data. Did i do anything wrong with the script or the options that i have checked in the opening tab ?


Thank you in advance.


25 Replies
geogou1973
Creator
Creator
Author

Hello.

I have two tables. The one the table for the items and the other is the table for the sales.

The table for the items has the item number and the barcode and the CSECAR (the first level of the category of the item). The table for the sales has the barcode and sales qty and sales amount. The data for the sales are uploading for the stores. In this table some times there are barcodes that are not included in the table of the items because are from the collection of franchise stores. For this reason the data are not matching and do not have CSECAR the field is null and with section access in the script we are losing them.

With which way can i avoid this problem ?

Thank you in advance

marcus_sommer

And the approach to check this field for NULL like above mentioned didn't work?

if(len(trim(CSECAR))=0, '#NV', CSECAR) as CSECAR

- Marcus

geogou1973
Creator
Creator
Author

Where can i put this command ?

When i load the table for the items ? If i put there it will not find anything because all the items have CSECAR.

Or in the section access and how ?

marcus_sommer

I think this need to come into your Sales table - there where you experience the NULL.

- Marcus

geogou1973
Creator
Creator
Author

There is not the field CSECAR in the table for sales. The matching between the two tables becomes with the field barcode.

marcus_sommer

Then you need to check the matching-result of the barcodes which led to the field CSECAR. Maybe you could post this part of the script.

- Marcus

geogou1973
Creator
Creator
Author

The data for the sales are uploading from the POS of the stores. The barcode is not null , but some barcodes are not in the collection of the database of the table of items because these barcodes are uploading from franchise stores.

marcus_sommer

Yes, but in some way must these field CSECAR be created or filled within your datamodel which you have in the link-table between your section access and the other data in your datamodel.

- Marcus

geogou1973
Creator
Creator
Author

This is the script :

Tab Sec

Section Access;

LOAD * INLINE [

ACCESS, NTNAME

ADMIN, DOMAINNAME\USERNAME1

USER, DOMAINNAME\USERNAME2

];

Section Application;

STAR IS *;

LOAD * INLINE [

NTNAME, CSECAR

DOMAINNAME\USERNAME1, *

DOMANINAME\USERNAME2, 10

];     


Tab Data

ITEMS:

LOAD

    CEANAR,

    BARCODE_ID,

    CFAMAR,

    CLPRAR,

    CAPRAR,

    BRAND,

    CMETAR,

    CRAYAR,

    CSECAR,

    CSFAAR,

    CSLPAR,

    CSTAAR,

    DEANAR,

    LARTAR,

    ITEM_ID,

    SUPPLIER_ID,

      TREFAR,

    CREATION_DATE

FROM \\qvdstorage\ITEMS.QVD (qvd);

SALES:

LOAD ITEM_ID,

    BARCODE_ID,

    STORE_ID,

    SALES_DATE,

    SALES_WEEK,

    SALES_WEEKDAY,

    SALES_YEAR,

    SALES_MONTH,

    SALES_QTY,

    SALES_AMT,

    CURRENT_SELPRICE,

    SALES_PERC_FPA,

    SALES_AMT_FPA,

    PRICE_LIST,

    PRICE_NET_LIST,

    PRICE_HALF_NET_LIST,

    PRICE_NET_NET_LIST,

    COST_SALES

FROM \\qvdstorage\SALES.QVD (qvd);


marcus_sommer

Your field is within the item-table:

....

ITEMS:

LOAD

    CEANAR,

    BARCODE_ID,

    CFAMAR,

    CLPRAR,

    CAPRAR,

    BRAND,

    CMETAR,

    CRAYAR,

    if(len(trim(CSECAR))=0, '#NV', CSECAR) as CSECAR,

    //CSECAR,

    CSFAAR,

    CSLPAR,

    CSTAAR,

    DEANAR,

    LARTAR,

    ITEM_ID,

    SUPPLIER_ID,

      TREFAR,

    CREATION_DATE

FROM \\qvdstorage\ITEMS.QVD (qvd);

.....

- Marcus