Hi,
I have the following data in table, OrderNO and Product
OrderNO Product
2004001 Coca Cola
Sprite
7-UP
2004002 Coca Cola
Sprite
1. By Order, I could count 2 Orders
2. By Product, I could count 5 Products
3. By Brand, I wish could count 3 Brands!
So, is any function or anyway could get result 3 (3 Brands) in Cube of
Analysis Services?
Thanks!
Angiangi,
I don't know about Analysis Services, but a select distinct Product from
yourtable will show you a unique list of products.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
angi wrote:
> Hi,
> I have the following data in table, OrderNO and Product
> OrderNO Product
> 2004001 Coca Cola
> Sprite
> 7-UP
> 2004002 Coca Cola
> Sprite
> 1. By Order, I could count 2 Orders
> 2. By Product, I could count 5 Products
> 3. By Brand, I wish could count 3 Brands!
> So, is any function or anyway could get result 3 (3 Brands) in Cube of
> Analysis Services?
> Thanks!
> Angi
>|||If you are looking for a query
select distinct product from yourtable
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"angi" <angi@.microsoft.com> wrote in message
news:%23w9GvBrfEHA.644@.tk2msftngp13.phx.gbl...
> Hi,
> I have the following data in table, OrderNO and Product
> OrderNO Product
> 2004001 Coca Cola
> Sprite
> 7-UP
> 2004002 Coca Cola
> Sprite
> 1. By Order, I could count 2 Orders
> 2. By Product, I could count 5 Products
> 3. By Brand, I wish could count 3 Brands!
> So, is any function or anyway could get result 3 (3 Brands) in Cube of
> Analysis Services?
> Thanks!
> Angi
>|||Thanks Mark and Wayne,
1. So, my requirement can't implement in AS cube?
In AS " Cube Edit ", there is a " Distinct Count " aggreagate function
(in Basic tag of Properties).
How to use this Distinct Count function? is any restrict during use this
function?
2. My requirement can implement in MDX query?
If can be, how should I modify this syntax?
3. Here I provide some information of Distinct Count aggregate function from
"Fast Track to MDX" this book.
In Chapter 12, page 152 write..
--
Distinct Count is an unusual function because it can only be used by a
measure.
It's used in measures to produce an aggregated value and it does this by
aggregating all instances of the same entity
in order to ascertain the number of unique values.
--
I dont understand what's real mean in second sentence, any idea?
Thanks
Angi
"angi" <angi@.microsoft.com> ¼¶¼g©ó¶l¥ó·s»D
:#w9GvBrfEHA.644@.tk2msftngp13.phx.gbl...
> Hi,
> I have the following data in table, OrderNO and Product
> OrderNO Product
> 2004001 Coca Cola
> Sprite
> 7-UP
> 2004002 Coca Cola
> Sprite
> 1. By Order, I could count 2 Orders
> 2. By Product, I could count 5 Products
> 3. By Brand, I wish could count 3 Brands!
> So, is any function or anyway could get result 3 (3 Brands) in Cube of
> Analysis Services?
> Thanks!
> Angi
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment