Home » Developer & Programmer » Reports & Discoverer » SUM instances between 2 values (OracleBI Discoverer Version 10.1.2.55.26)
SUM instances between 2 values [message #657755] Mon, 21 November 2016 11:01 Go to next message
hogsrul
Messages: 1
Registered: November 2016
Location: Atlanta, GA
Junior Member
I have a Count distinct Unit Price column (Contains all of the different prices paid for a product during a specific time period) and I want to count the number of times Unit Price falls between 2 values for a weekly time frame. These two values are specified items with a static value in each column for same time period.

Example:

Dist Count Unit Price = 50, of those 50 unique values, how many of them fall between Net Cost and Sales rep Cost?

Any help would be appreciated.
Re: SUM instances between 2 values [message #657762 is a reply to message #657755] Tue, 22 November 2016 01:17 Go to previous message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Generally speaking, that would be
select count(distinct unit_price)
from your_table
where some_column between net_cost and sales_rep_cost

"net_cost" and "sales_rep_cost" can be report items; in that case, precede their names with a colon (:).
Previous Topic: Generate SAVE disabled PDF - ORACLE Reports
Next Topic: format trigger ' M_4 ' references column ' CF_SEG ' at wrong frequency
Goto Forum:
  


Current Time: Thu Mar 28 06:38:53 CDT 2024