Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to calculate count of records

M.Adnan.AnsariSep 2 2010 — edited Sep 5 2012
I have a fact table with following columns:

Invoice_no
Date_key
Product_key
Sales
Cost

There are multiple lines for each invoice.

I have created a AWM schema where I have a product dimension and Date dimension. Date dimension has year, month and day as one hierarcy.

I have created a cube on this table with dimensions of date & product.

The cube shows a summary by product as well as by date dimension. The last level of summary is based on a day. I would like to count the no of records which sum up in a day.

For example, I need the count column in the following result set in the cube:

Day--------------product---------sales--------Cost------Count
01-jan-2010---Lays Chips-----20000------15000---20

here count is the no of records which sum up to make 20000 value sales.

what formula in AWM I have to use for this calculated measure.

I am using AWM 11.2.0.1.0A
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 3 2012
Added on Sep 2 2010
3 comments
1,024 views