Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
i have a problem
i have two tables
the first one called visits which contain this data
| EmpKey | State |
| 1 | Matrouh |
| 2 | Giza |
| 3 | Alex |
| 4 | South Sinai |
| 5 | Faiyom |
| 6 | cairo |
| 2 | Cairo |
| 4 | Cairo |
| 6 | Cairo |
| 2 | Alex |
| 3 | Alex |
| 1 | Cairo |
| 2 | Cairo |
| 3 | Cairo |
and the second one called Map and contain this data
| Customer X | Customer Y | State |
| 133.488 | 781.963 | Matrouh |
| 295.701 | 606.364 | Giza |
| 349.772 | 802.657 | Alex |
| 611.679 | 661.239 | South Sinai |
| 402.154 | 683.189 | Faiyom |
| 473.122 | 713.371 | cairo |
and i want to count for each state the no of visits
So i make
load EmpKey,
State,
1 as visitCount;
and for the state i sum the visitCount and it's okay
The problem when i tried to show the visitcount for each state on the map so i made ajoin between the first and escond table on (State) but when summing visitcount it appears always 1
So,What's the problem?
Attached the QVW document if anyone can help me?
Skip the EmpKey and just load the State and the visitcount for the State values:
Join (Map)
LOAD
State,
Count(State) as VisitCount
FROM
Map2.xls
(biff, embedded labels, table is Sheet1$)
group by State;