Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
gerry_hdm
Creator II
Creator II

Croos the Value from more as one records

Hello

sorry for my english is a google language [:$]

I hope you can help me. 'm a beginner.

I have a table in which I record in the column 2 in a row would have

the table structure is

column1;column2

X1;abc+

X1;xyz+

X1;123+

X2;xxx+

X2;yyy+

my dream result -->
column1,columnNEW
X1;abc+xyz+123+
X2;xxx+yyy+

've tried with a Crosstab but not have got done

regards, gerry

1 Solution

Accepted Solutions
gerry_hdm
Creator II
Creator II
Author

Hello

here is the result I want as an example



regards Gerry


_________________________________________________

// here is the coding and a example

CrossExampleStartingTable:

LOAD FieldGroup,

     FieldCross

Inline [FieldGroup,FieldCross

x201,Lager1

x201,Lager2

x202,Lager1

x202,Lager3

x202,lager4

X206,Lager4

];    

 

 

    

CrossTransformTable :

load

FieldGroup,

if(FieldGroup = previous(FieldGroup)  and FieldCross <> previous(FieldCross),  peek('Crosswert') & '!'& FieldCross ,FieldCross) as Crosswert,

if(FieldGroup = previous(FieldGroup)  and FieldCross <> previous(FieldCross),  peek('CountCrossfield') + 1 , 1) as CountCrossfield

resident CrossExampleStartingTable

order by FieldGroup,FieldCross ;

ResultCrossTable:

LOAD FieldGroup,

LastValue(Crosswert) as LastCrossLoaded ,

LastValue(CountCrossfield) as LastCountCrossLoaded

Resident CrossTransformTable

Group By FieldGroup;

View solution in original post

5 Replies
Not applicable

Gerry,

Can I ask you why you want o create a cross-table?

QlikView love the file structure you descibed.

Rich

gerry_hdm
Creator II
Creator II
Author

hi rich
I want all records from the 2 "Column are one behind the wheels, I've Sometimes provider only 1 record for column 1 or up to 6 records

Since the structure but has all the records with each other, I would like to set the column 2 across

with the functions min () and max () Unfortunately I get only the first and last.
Maybe there is a possibility in the first diagram 2. 3. 4. ... Display data using a formula.

Thank You Note Gerold

Not applicable

gerry_hdm
Creator II
Creator II
Author

Hi sorry,

but unfortunately this is not the result that I want to represent.

This post have seen me.

Can I sort this to me somehow, and then records it in a row ?

(with the function previous() ) ???

gerry_hdm
Creator II
Creator II
Author

Hello

here is the result I want as an example



regards Gerry


_________________________________________________

// here is the coding and a example

CrossExampleStartingTable:

LOAD FieldGroup,

     FieldCross

Inline [FieldGroup,FieldCross

x201,Lager1

x201,Lager2

x202,Lager1

x202,Lager3

x202,lager4

X206,Lager4

];    

 

 

    

CrossTransformTable :

load

FieldGroup,

if(FieldGroup = previous(FieldGroup)  and FieldCross <> previous(FieldCross),  peek('Crosswert') & '!'& FieldCross ,FieldCross) as Crosswert,

if(FieldGroup = previous(FieldGroup)  and FieldCross <> previous(FieldCross),  peek('CountCrossfield') + 1 , 1) as CountCrossfield

resident CrossExampleStartingTable

order by FieldGroup,FieldCross ;

ResultCrossTable:

LOAD FieldGroup,

LastValue(Crosswert) as LastCrossLoaded ,

LastValue(CountCrossfield) as LastCountCrossLoaded

Resident CrossTransformTable

Group By FieldGroup;