Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Read about the latest Qlik Community enhancements on the Community News blog!
cancel
Showing results for 
Search instead for 
Did you mean: 
mmarchese
Creator II
Creator II

Why are the wrong values loaded from my QVD?

Am I doing something wrong or is Qlik malfunctioning?  Why are the wrong values being loaded into the data model?  This is happening with my other QVDs too.

SQL Server (correct values):
SQL Server.png

QVD (correct values):
QVD.png

Data model (wrong values):
data model.png

Load statement:

 

 

Dim_ScrapTracker:
LOAD
    %scrapTrackerId,
    [Scrap Tracker]
FROM [lib://folder - QVDs/Dim_ScrapTracker.qvd] (qvd);

 

 

Update:

I realized Qlik brings in the data correctly if I load this table in isolation or load it first.  But if I load the fact table containing that same key field (%scrapTrackerId) first, then the values in this dimension table get shuffled around.  This is truly baffling.

Labels (4)
1 Solution

Accepted Solutions
mmarchese
Creator II
Creator II
Author

Ahhhhh, I figured it out.  I put this at the end of the script to be clever and then totally forgot about it:

AutoNumber '%*';

In this case, if the dimension table is loaded first, the auto-numbering of %scrapTrackerId just so happens to match the original numbering of that field, obscuring the fact that AutoNumber was used.  In contrast, if the fact table is loaded first, the field ends up with different numbers.

Lesson: Don't be a fool and forget that you used AutoNumber!  Disable it before debugging such fields!

View solution in original post

3 Replies
marcus_sommer
MVP & Luminary
MVP & Luminary

How does it look like if you put these fields within a table in the UI?

- Marcus

mmarchese
Creator II
Creator II
Author

@marcus_sommer 

It matches the data model.

mmarchese
Creator II
Creator II
Author

Ahhhhh, I figured it out.  I put this at the end of the script to be clever and then totally forgot about it:

AutoNumber '%*';

In this case, if the dimension table is loaded first, the auto-numbering of %scrapTrackerId just so happens to match the original numbering of that field, obscuring the fact that AutoNumber was used.  In contrast, if the fact table is loaded first, the field ends up with different numbers.

Lesson: Don't be a fool and forget that you used AutoNumber!  Disable it before debugging such fields!

View solution in original post