Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
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