Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Identify Opponents Team Name

Hi All

I am looking to identify an opponents Team Name by looking at current data in the csv

I have used ''Filename() as Clientname'' in the script to identify my client teams name

My clients Team Name (e.g Team 1) and Opponent Name (e.g Team A) appears in both fields depending on which team is Pitching

I need to to identify that Team A is the Opponent Teams Name (i.e the Team Name that does not equal Clientname)

In the .csv file, the data appears as follows

Pitching Team,Hitting Team

Team 1,Team A

Team 1, Team A

Team 1,Team A

Team 1, Team A

Team 1,Team A

Team 1, Team A

Team A,Team 1

Team A, Team 1

Team A,Team 1

Team A, Team 1

Team A,Team 1

Team A, Team 1

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe something like

LOAD *,

       If( ClientName = [Pitching Team],[Hitting Team], [Pitching Team]) AS Opponent;

LOAD [Pitching Team],[Hitting Team], Subfield(Filename(),'.',1) as Clientname

FROM 'Team 1.csv';

View solution in original post

5 Replies
arasantorule
Creator III
Creator III

Hi,

Can you please explain in detail.

From the above details I understand that, we need to identify opponent team for each team.

In that case, it is Qlikview's basic ability to map and result the relevant fields

Thanks.

sunny_talwar

Are you trying to set two variables with client name team and opponent team? Where exactly do you need this information?

sorrakis01
Specialist
Specialist

Hi kevin,

Can you explain better the problem or upload the project?

Regards

swuehl
MVP
MVP

Maybe something like

LOAD *,

       If( ClientName = [Pitching Team],[Hitting Team], [Pitching Team]) AS Opponent;

LOAD [Pitching Team],[Hitting Team], Subfield(Filename(),'.',1) as Clientname

FROM 'Team 1.csv';

Not applicable
Author

Thank you for the correct answer