Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
0li5a3a
Creator III
Creator III

How to split the values into a column

Hi there,

 

I have a qvd where I want to split the values of one column, the find below the format of the table.

 

Table:

id,name,price

1, Jon, 200

2, Atilla,400

3, Mario,600

4,Ronaldo,800

5,Pele,1200

6, Ronaldinho,1800

I want to create a table which needs to look like this:

 

Table:

id,name,price

1, Jon, 200

2, Atilla,400

3, Mario,600

4,Ronaldo,800

5,Pele,600

5,Pele,600

6, Ronaldinho,800

6, Ronaldinho,800

Is this possible in qlikview ?

Thanks in advance Const!

 

 

1 Solution

Accepted Solutions
PrashantSangle

not sure about it is optimize way do it. but you can try below

base_table:
Load * Inline [
id,name,price
1, Jon, 200
2, Atilla,400
3, Mario,600
4, Ronaldo,800
5, Pele,1200
6, Ronaldinho,1800
];

NoConcatenate
Temp:
Load IterNo() as rec,
*
While IterNo()<3;
Load
id,
name,
(price)/2 as price
Resident base_table
where price>=1000
;

Concatenate
Load 1 as rec,
id,
name,
price
Resident base_table
where price<1000
;
drop Table base_table;

Regards,
Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

4 Replies
PrashantSangle

on what basis you are dividing value also is it applicable for all rows or for specific row?
Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
0li5a3a
Creator III
Creator III
Author

Hi , thanks for the reply back. Is only applicable only for the values which are 1600 and 1800. Basically I need to split the values on half.


@PrashantSangle wrote:
on what basis you are dividing value also is it applicable for all rows or for specific row?


 

0li5a3a
Creator III
Creator III
Author

Hi , thanks for the reply back. Is only applicable only for the values which are 1600 and 1800. Basically I need to split the values on half.



 

PrashantSangle

not sure about it is optimize way do it. but you can try below

base_table:
Load * Inline [
id,name,price
1, Jon, 200
2, Atilla,400
3, Mario,600
4, Ronaldo,800
5, Pele,1200
6, Ronaldinho,1800
];

NoConcatenate
Temp:
Load IterNo() as rec,
*
While IterNo()<3;
Load
id,
name,
(price)/2 as price
Resident base_table
where price>=1000
;

Concatenate
Load 1 as rec,
id,
name,
price
Resident base_table
where price<1000
;
drop Table base_table;

Regards,
Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂