I am creating a column graph to show number of transactions per week/month/quarter over a period. There are times however when there are no transactions in a week/month/quarter, and currently my graph doesn't show these zeroes (because my query doesn't show it). Do I need to change my query or is there a way to force the graph to include the dates that are missing from the data?
Assuming it's the query how can I create a record for each period, even when there are no transactions in that period?
The code I use to generate the period that I then group on is:
Public Function ByPeriod(DateRaised As Date) As String
Dim vPeriod As Integer
veriod = Forms![SelectPeriod]![optPeriod]
If vPeriod = 1 Then
ByPeriod = Format(DateRaised, "ww"" '""yy"
ElseIf vPeriod = 2 Then
ByPeriod = Format(DateRaised, "mmm"" '""yy"
ElseIf vPeriod = 3 Then
ByPeriod = Format(DateRaised, "q"" Qtr - ""yy"
Else
ByPeriod = DateRaised
End If
End Function
Assuming it's the query how can I create a record for each period, even when there are no transactions in that period?
The code I use to generate the period that I then group on is:
Public Function ByPeriod(DateRaised As Date) As String
Dim vPeriod As Integer
veriod = Forms![SelectPeriod]![optPeriod]
If vPeriod = 1 Then
ByPeriod = Format(DateRaised, "ww"" '""yy"
ElseIf vPeriod = 2 Then
ByPeriod = Format(DateRaised, "mmm"" '""yy"
ElseIf vPeriod = 3 Then
ByPeriod = Format(DateRaised, "q"" Qtr - ""yy"
Else
ByPeriod = DateRaised
End If
End Function