Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Tell us which business and trade publications you read most regularly: RESPOND NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
alenb
Partner - Contributor III
Partner - Contributor III

Cross table for columns with 'X' flags

I have data such as this.

product, team a, team b, team c

p1, x,,

p2, x, x, x

p3, x,  , x

 

As a result I need to create a table like this:

p1, team a

p2, team a

p3, team a

p2, team b

p2, team c

p3, team c

 

I think the way to go is with Crosstable function but I can't find the appropriate example.

 

 

 

 

 

 

 

 

 

1 Solution

Accepted Solutions
PriyankaShivhare
Creator II
Creator II

CrossTable(TeamName,TeamNo,1)
Test:
Load * Inline [

product, team a, team b, team c

p1, x,,

p2, x, x, x

p3, x, , x

];

 

Final:

Load product,

          if(len(TeamNo)>0,TeamName) as TeamName

Resident Test;

Drop Table Test;

Hope this Helps!

Thanks,
Priyanka

View solution in original post

1 Reply
PriyankaShivhare
Creator II
Creator II

CrossTable(TeamName,TeamNo,1)
Test:
Load * Inline [

product, team a, team b, team c

p1, x,,

p2, x, x, x

p3, x, , x

];

 

Final:

Load product,

          if(len(TeamNo)>0,TeamName) as TeamName

Resident Test;

Drop Table Test;

Hope this Helps!

Thanks,
Priyanka