sum of distinct member mdx

Hi Team,

how to get the mdx for the distinct members like

Ex
market value
1 10
2 10
4 20
1 10

the output should be
1 10
2 10
4 20

Thanks in advance
Regards
krishna_harikAsked:
Who is Participating?
 
RiteshShahConnect With a Mentor Commented:
select Max(id),ValueofId from tablename group by valueofID
0
 
RiteshShahCommented:
use this.
create table dist
(
id int,
val int
)
 
insert into dist
select 1, 10 union all
select 2, 10 union all
select 4, 20 union all
select 1, 10
 
 
select Max(id),id,Val from dist group by id,val

Open in new window

0
 
RiteshShahCommented:
if you don't want to see three column in result set than use this one.

select id,val from
(
select Max(id) as maxid,id,Val from dist group by id,val
) t
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
lwadwellConnect With a Mentor Commented:
Hi krishna_harik,

try

SELECT DISTINCT market, value FROM yourtable

lwadwell
0
 
krishna_harikAuthor Commented:
I want the mdx to get the sum(distinct members)

not the sql query
0
 
RiteshShahCommented:
0
 
sateeshcvConnect With a Mentor Commented:
HI,
try the below query
SELECT DISTINCT ID,VALUE FROM TABLE_NAME
0
 
krishna_harikAuthor Commented:
I want the mdx to get the sum(distinct members)

not the sql query!!! :(
0
 
krishna_harikAuthor Commented:
thanks for your response
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.