Hi, wonder if someone can advise?
I have the following query which allows me to create a graph.
It results in the following results: Test, Interval and Count.
However if the count value is nothing, then no Interval is generated and then no data is generated and the graph generates an error message.
In other words, I would like to have the following result:
Test Interval Count
All 2022 01 0
All 2022 02 0
All 2022 03 0
All 2022 04 0
All 2022 05 0
This is the query:
SELECT IIf([SampleTestedFor].[Packed]=8,'','ELISA') AS Test, Format([Order_received],'yyyy') & " " & Right('0' & Format([Order_received],'mm'),2) AS [Interval], Count([TestedFor]) AS [Count]
FROM ((Samples_List INNER JOIN SampleTestedFor ON Samples_List.Sample_ID = SampleTestedFor.Sample_ID) LEFT JOIN Test_Methods ON SampleTestedFor.UniqueMethod_ID = Test_Methods.UniqueMethod_ID) INNER JOIN Orders ON Samples_List.Order_ID = Orders.Order_ID
WHERE (((Test_Methods.TestGroupCode)=2 Or (Test_Methods.TestGroupCode)=3))
GROUP BY Format([Order_received],'yyyy') & " " & Right('0' & Format([Order_received],'mm'),2), SampleTestedFor.Packed;
Can someone assist please?
I have the following query which allows me to create a graph.
It results in the following results: Test, Interval and Count.
However if the count value is nothing, then no Interval is generated and then no data is generated and the graph generates an error message.
In other words, I would like to have the following result:
Test Interval Count
All 2022 01 0
All 2022 02 0
All 2022 03 0
All 2022 04 0
All 2022 05 0
This is the query:
SELECT IIf([SampleTestedFor].[Packed]=8,'','ELISA') AS Test, Format([Order_received],'yyyy') & " " & Right('0' & Format([Order_received],'mm'),2) AS [Interval], Count([TestedFor]) AS [Count]
FROM ((Samples_List INNER JOIN SampleTestedFor ON Samples_List.Sample_ID = SampleTestedFor.Sample_ID) LEFT JOIN Test_Methods ON SampleTestedFor.UniqueMethod_ID = Test_Methods.UniqueMethod_ID) INNER JOIN Orders ON Samples_List.Order_ID = Orders.Order_ID
WHERE (((Test_Methods.TestGroupCode)=2 Or (Test_Methods.TestGroupCode)=3))
GROUP BY Format([Order_received],'yyyy') & " " & Right('0' & Format([Order_received],'mm'),2), SampleTestedFor.Packed;
Can someone assist please?
Last edited: