Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
sivakrishna
Contributor II
Contributor II

To find the most occurred Value From Two Fields without concatenating

If i have Data   like below then how to find most occurred value from from both fields 

Load * Inline

[ Team1, Team2

India, England
Australia, Pakistan
India, Pakistan
England, Australia
New zealand, India
England, Pakistan
Australia, India
India, Sri Lanka

];

My target is to find most matches played team from both team1 and team2 (India) without concatenating the teams as one field

2 Replies
Frank_Hartmann
Master II
Master II

Maybe like this?

 

script:

1:
Load  *,RowNo() as dummy Inline
[ Team1, Team2
India, England
Australia, Pakistan
India, Pakistan
England, Australia
New zealand, India
England, Pakistan
Australia, India
India, Sri Lanka
] ;

CrossTable(Team,Country)
load dummy,  Team1, Team2 Resident 1; DROP Table 1;

 

Straight Table:

Dimension = Country

Expression = count(Country)

 

hope this helps

sivakrishna
Contributor II
Contributor II
Author

Thanks for Your Reply on problem.

But her i would like to keep the data on two fields because i have more fields in this table, so my target is to find most occurred value from both fields without duplicating and increasing the size of the application i hope you will understand my scenario