Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I have data like this
Match ID COMP1 COMP2
1 Team1 Team2
2 Team2 Team3
3 Team3 Team1
...
I want to show in a graph, How many matches each team has played.
How can I achieve this.
Thanks
load a flag in the script:
LOAD if(COMP1=COMP2,1) as FLAG...
then
do a count(FLAG) in the chart
Hi
How can COMP1 be equal to COMP2?
There will be 2 different teams playing a match
A:
Load Match,Comp1 AS Company;
LOAD * INLINE [
Match, Comp1
1, Team1
2, Team2
3, Team3
];
Concatenate
Load Match,Comp2 AS Company;
LOAD * INLINE [
Match, Comp2
1, Team2
2, Team3
3, Team1
];
LOAD COMP1 as COMP resident Yourtable;
concatenate
LOAD COMP2 as COMP resident Yourtable;
then count(COMP) in the chart / script and COMP as dimension
May be using a link table approach
Table:
LOAD * Inline [
Match ID, COMP1, COMP2
1, Team1, Team2
2, Team2, Team3
3, Team3, Team1
];
LinkTable:
LOAD [Match ID],
COMP1 as Team,
'Comp1' as Flag
Resident Table;
Concatenate(LinkTable)
LOAD [Match ID],
COMP2 as Team,
'Comp2' as Flag
Resident Table;
hey Ankit , i think this you want ,
A:
Directory;
CrossTable(Comp, Team)
LOAD Match,
Comp1,
Comp2
FROM
[New Microsoft Excel Worksheet.xlsx]
(ooxml, embedded labels, table is Sheet1, filters(
Transpose(),
Transpose()
));