Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
sogloqlik
Creator II
Creator II

Added field and Strait table presentation

Hi,

My code performs a load from an Excel file, and I am adding a column of my own.

For example:

Load

LOAD

AM,
"Start Date",
Task,
"Agency department",
Comments,
"Task With",
"End Date",
"Assigned To",
Status,
Deliverables,
outcome,
"Etimated Hours",
"# of resources"

'TableName’ as  Name // Added Column, not a column in the file.

.....

 

When I present the data in a Strait Table, it adds a line with the value of the new column with all the other column with Null.

I counted the number of rows in the script with and without the add column and it is the same.

What am I missing?

 

Regards.

 

Labels (2)
1 Solution

Accepted Solutions
mpc
Partner - Specialist
Partner - Specialist

Hi, 

Excel or QVD, the behavior should be the same. 

My code: 

LOAD
ID,
Prix_de_vente,
Marge,
Date_de_vente,
Date_de_paiements,
Client_ID,
Commercial_ID,
Voiture_ID,
'Test' as MyAddedField
FROM [lib://DataFiles/ventes.xlsx]
(ooxml, embedded labels, table is [ventes (1)]);

My result:

maximepiquetcointe_0-1712651090772.png

Best regards

From Next Decision and me with love
This answer help you ? Like it ! Problem solved ? Mark it !

View solution in original post

4 Replies
mpc
Partner - Specialist
Partner - Specialist

Hi, I've perfom a test with this code:

Ventes:
LOAD
"ID Vente",
"ID Client",
"ID Vendeur",
"ID Véhicule",
"Prix de vente",
"Prix de fabrication du véhicule",
"Coût logistique",
Date("Date de la vente") as "Date de la vente",
Date("Date de récupération du véhicule") as "Date de récupération du véhicule",
'Test' as MyAddedField
FROM [Ventes.qvd]
(qvd);

Here the result in my table:

maximepiquetcointe_0-1712650619409.png

Can you share the complete script please ? 

Regards 



From Next Decision and me with love
This answer help you ? Like it ! Problem solved ? Mark it !
sogloqlik
Creator II
Creator II
Author

Hi,

As I wrote, My Data from Excel, not from QVD.

Besides that, My code is the same.

Regards.

 

mpc
Partner - Specialist
Partner - Specialist

Hi, 

Excel or QVD, the behavior should be the same. 

My code: 

LOAD
ID,
Prix_de_vente,
Marge,
Date_de_vente,
Date_de_paiements,
Client_ID,
Commercial_ID,
Voiture_ID,
'Test' as MyAddedField
FROM [lib://DataFiles/ventes.xlsx]
(ooxml, embedded labels, table is [ventes (1)]);

My result:

maximepiquetcointe_0-1712651090772.png

Best regards

From Next Decision and me with love
This answer help you ? Like it ! Problem solved ? Mark it !
sogloqlik
Creator II
Creator II
Author

Problem Solved,

 

There was an issue with the Excel file.

Thx for the help.