Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I include zero values in Column Graph over Period?

Status
Not open for further replies.

StuKregor

Technical User
Jun 18, 2001
15
0
0
AU
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


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top