X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
2 Pages V < 1 2  (Go to first unread post)
   Reply to this topicStart new topic
> Bar Chart Data - Displaying 2 Data Groups Side By Side, Access 2000    
post Jul 2 2020, 09:05 AM

Posts: 1,512
Joined: 25-January 16
From: The Great Land

The SQL for Query1 seems to have posted badly because when I tried to copy/paste it from the post it didn't work so trying again. Use Date() instead of Now():

PARAMETERS [forms]![PADC]![P$MIN] Long, [forms]![PADC]![P$INCR] Long, [forms]![PADC]![P$MAX] Long;
SELECT Partition([Now List],[forms]![PADC]![P$MIN],[forms]![PADC]![P$MAX],[forms]![PADC]![P$INCR]) AS Range, Switch([SaleDate]>Date()-365,"Current",[SaleDate]>Date()-730,"Previous") AS SDPer, Count(*) AS Cnt
WHERE (((FREIS.Twp) Like "jac*") AND ((FREIS.Status) In ("S")) AND ((FREIS.PType)="res") AND ((FREIS.SaleDate)>Date()-730) AND ((FREIS.[Now List])>1000))
GROUP BY Partition([Now List],[forms]![PADC]![P$MIN],[forms]![PADC]![P$MAX],[forms]![PADC]![P$INCR]), Switch([SaleDate]>Date()-365,"Current",[SaleDate]>Date()-730,"Previous");

Did you try query?

Because of the Switch() function, a record cannot be captured in both date periods. Once it meets the "Current" criteria and gets that tag it will not be assigned as "Previous".

Attachments Manager is below the edit post window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Go to the top of the page
2 Pages V < 1 2

Custom Search

RSSSearch   Top   Lo-Fi    4th July 2020 - 10:19 AM