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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TimeSpan Prob

Status
Not open for further replies.

Greg007

Technical User
Sep 7, 2004
4
DE

Hello
I have prob TimeDimensions.

Its about customers in a supermarket.

ROWDATA
CustomerID
VisitStartTime
VisitEndTime
Spending

TimeDimension
Year, Month, Day, Hour; Minute

I know how to calculate Total-Spendings along TimeDimension, no Prob.

Question:
How can I calculate the number of Customers that are in the Supermarket (started shopping but have not finished) along TimeDimension??

Thx
Greg


 
in the fact table or view I would have a bit column like VisitActive 1 for yes 0 for no when End time > Start time and EndTime Is not null the VisitActive 0 if Visit Endtime Is null then 1. Sum all of the 1s and you should have it.

Shoot Me! Shoot Me NOW!!!
- Daffy Duck
 
thx Daffy but - as far I understand you in the right manner - in this case a have to calculate "shopping Active" before running the cube for only one fixed Date. In this case it might be faster to use ms-query ;-))
Greg


 
it probably would be faster unless you are doing realtime olap. If your using SQL Reporting Services you could probably build the required report in there.

Shoot Me! Shoot Me NOW!!!
- Daffy Duck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top