CrossTab Query count with grouping

S

sq75222

Is there an simple way for follow grouping:
Model Results
3-001 Scrap
3-002 Read_NF
3-001 LED
3-003 Scrap
Results need to show as
Model Pass Scrap
3-001 1 1
3-002 1 0
3-003 0 1
 
D

Duane Hookom

What have you tried? Do you have any table that states that Read_NF and LED
are Pass?

If you want everything not Scrap as Pass, create a crosstab with Model as
the Row Heading, Count(Model) as the Value, and
IIf([Results]="Scrap","Scrap","Pass")
 
S

sq75222

If the list in the Results did not have the "Scrap" value but I need to show
as

Model Results | Model Pass
Scrap
3-001 Read_NF | 3-001 2 0
3-002 Read_NF | 3-002 1
0
3-001 LED | 3-003 1
0
3-003 LED


Duane Hookom said:
What have you tried? Do you have any table that states that Read_NF and LED
are Pass?

If you want everything not Scrap as Pass, create a crosstab with Model as
the Row Heading, Count(Model) as the Value, and
IIf([Results]="Scrap","Scrap","Pass")

--
Duane Hookom
Microsoft Access MVP


sq75222 said:
Is there an simple way for follow grouping:
Model Results
3-001 Scrap
3-002 Read_NF
3-001 LED
3-003 Scrap
Results need to show as
Model Pass Scrap
3-001 1 1
3-002 1 0
3-003 0 1
 
S

sq75222

Hey, I get it already by add in the pivot (......) in ("Pass","Scrap")

However thank

sq75222 said:
If the list in the Results did not have the "Scrap" value but I need to show
as

Model Results | Model Pass
Scrap
3-001 Read_NF | 3-001 2 0
3-002 Read_NF | 3-002 1
0
3-001 LED | 3-003 1
0
3-003 LED


Duane Hookom said:
What have you tried? Do you have any table that states that Read_NF and LED
are Pass?

If you want everything not Scrap as Pass, create a crosstab with Model as
the Row Heading, Count(Model) as the Value, and
IIf([Results]="Scrap","Scrap","Pass")

--
Duane Hookom
Microsoft Access MVP


sq75222 said:
Is there an simple way for follow grouping:
Model Results
3-001 Scrap
3-002 Read_NF
3-001 LED
3-003 Scrap
Results need to show as
Model Pass Scrap
3-001 1 1
3-002 1 0
3-003 0 1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top