If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

count number of customer for each hour

Started by CognosAdmn, 11 Nov 2009 12:59:54 AM

Previous topic - Next topic

CognosAdmn

Hello All,

I am building a report to display the customer traffic for a retail store.
I have the following fields in my database. CustomerVisit, CustomerPurchaseDateTime, Product.

I need to develop a report for a certain product, depending on users selection, and display the number of customer who bought that product. this information should be displayed in the report for each hour the store is open.
so the report needs to display 10-11 --> 15 customers; 11-12 --> 20 customers; 12-1 --> 10 customers; etc. until 8-9 (PM).

Where I need help is to break the CustomerPurchaseDateTime into an hourly interval. and to assign the number of customers who visited the store during that interval. The report will be run for one day at a time.

Would someone please be able to help me out with this task?

Thank you in advance.

CognosAdmn


cschnu

First you must calculate what hour a given datetime falls in so:

extract(HOUR, [Invoice Payable].[Invoice].[INVOICE_DATE])

Then I think you just count that data item in your report

count(DataItemName)

CognosAdmn

Thank you Sir. I appreciate your time and help.