Yet Another Query Prob (1 Viewer)

Ashfaque

Student
Local time
Today, 14:03
Joined
Sep 6, 2004
Messages
894
Hi,

My this query I created is presenting department wize employees including all nationalities.

Code:
TRANSFORM Count(T_JobOffer.[CDept]) AS CountOfCDept
SELECT T_JobOffer.[CDept]
FROM T_JobOffer
GROUP BY T_JobOffer.[CDept]
ORDER BY T_JobOffer.[CDept]
PIVOT T_JobOffer.[CNationality];

There is a dept called "Top Management" which I dont want to appear in my graph therefore I was modifying the above query using <>"Top Management" but it says "You can't specify on the same field for which you entered value in the cross tab row"

Any help?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:33
Joined
May 7, 2009
Messages
19,249
TRANSFORM Count(T_JobOffer.[CDept]) AS CountOfCDept
SELECT T_JobOffer.[CDept]
FROM T_JobOffer
WHERE Nz([Cdept], "Top Management") <> "Top Management"
GROUP BY T_JobOffer.[CDept]
ORDER BY T_JobOffer.[CDept]
PIVOT T_JobOffer.[CNationality];
 

Ashfaque

Student
Local time
Today, 14:03
Joined
Sep 6, 2004
Messages
894
Msg appearing "You can't assign a value to this object" and removing the modified code keeping the old one
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 04:33
Joined
Feb 19, 2002
Messages
43,603
I don't know why arnel's solution doesn't work but you can create a select query that eliminates the unwanted value and use that querydef instead of the table in you CrossTab query.
 

Ashfaque

Student
Local time
Today, 14:03
Joined
Sep 6, 2004
Messages
894
Hi Pat,

I tried to replace and made new SELECT query. But attached msg is appearing
Code:
SELECT A.CDept, Count(A.CNationality) AS CountOfCNationality
FROM A
GROUP BY A.CDept
HAVING (((A.CDept)<>"Top Management"))
ORDER BY A.CDept;
 

Attachments

  • 2.jpg
    2.jpg
    219.8 KB · Views: 283

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:33
Joined
May 7, 2009
Messages
19,249
try to delete/re-create the chart.
 

Ashfaque

Student
Local time
Today, 14:03
Joined
Sep 6, 2004
Messages
894
This time it is working....let me check if there are still some errors.....
 

Users who are viewing this thread

Top Bottom