Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Yuhka
Contributor III
Contributor III

Generate fixed data automatically and insert a row

Hello everyone, I'm new to qlikview.

I have data which has columns : Name, Date, Subject and Score.

On my qvw, I created a pivot table which dimention is Date and showing the score by the subjects of each person.

Score_1.PNG

 

Then, now I would like to insert a row as below.Score_2.PNG

With the assumption:

- I cannot fix the source data.

- "Date: Friday", "Subject:  computer science" and "Score: 100" is a fixed value. Whatecer I select in the listbox, the value should be the same.

 

Is there any way to do this?

Thank you for your support!   

Labels (5)
1 Solution

Accepted Solutions
Vengatesh
Partner - Creator
Partner - Creator

Try this

Source:
LOAD Name,
Date,
Subject,
Score
FROM
[Score.xlsx]
(ooxml, embedded labels, table is Sheet1);


Concatenate
LOAD Distinct Name,
'Friday' as Date,
'Computer Science' as Subject,
100 as Score

Resident Source;

You Know What To Do.

View solution in original post

6 Replies
arpitkharkia
Creator III
Creator III

You can concatenate an inline table with the required values to the imported table.

I hope this makes sense. Let me know if there is still any confusion.

Thanks!

Arpit

Yuhka
Contributor III
Contributor III
Author

@arpitkharkia, thank you for your quick reply.

I tried concatenate inline, but it didn't go well.

In case to load inline the values "Date: Friday", "Subject: computer science" and "Score: 100", the row is added but Name column becomes null as below.

Score_3.PNG

Then I select something in the Name listbox, due to this record is not apply to the selection so the row of computer science is not shown in the pivot table.

Only when nothing is selected, the row is shown on the pivot table.

Score_4.PNG

arpitkharkia
Creator III
Creator III

There are three rows that you will need to add, one for each of the names.

I hope i make sense. Let me know if there is still any confusion.

Regards,

Arpit

PFA

Yuhka
Contributor III
Contributor III
Author

Arpit san, thank you for your answer.

Sorry for confusing you. I'm looking for the way to generate the record without inputting Name manually.

Currently the Name is only three kinds, but I have to create qvw assuming the possibility of increase or decrease of the Name.

So what I would like to do is always showing the row of "Dat: Friday"-"computer science"-"Score: 100" whatever I select in the listbox.

Thank you very much for your support!

Vengatesh
Partner - Creator
Partner - Creator

Try this

Source:
LOAD Name,
Date,
Subject,
Score
FROM
[Score.xlsx]
(ooxml, embedded labels, table is Sheet1);


Concatenate
LOAD Distinct Name,
'Friday' as Date,
'Computer Science' as Subject,
100 as Score

Resident Source;

You Know What To Do.
Yuhka
Contributor III
Contributor III
Author

@Vengatesh , thank you for your answer!

It worked perfectly! Thank you very much for your support!Smiley LOL