| Author |
Topic |
|
inbs
Aged Yak Warrior
860 Posts |
Posted - 2009-01-12 : 05:34:29
|
| how i convert it to mdx?SELECT Count(DISTINCT CustomerNumber)FROM FACTGROUP BY YEARthanks |
|
|
soorajtnpki
Posting Yak Master
231 Posts |
Posted - 2009-01-12 : 06:38:18
|
| I am not getting u ? Can u explain it... |
 |
|
|
inbs
Aged Yak Warrior
860 Posts |
Posted - 2009-01-12 : 07:07:15
|
| i want to create calculated member,how i wrote this query?(it count all DISTINCT customers by years) |
 |
|
|
karthik_padbanaban
Constraint Violating Yak Guru
263 Posts |
Posted - 2009-01-12 : 07:24:31
|
| could you explain bit more..? |
 |
|
|
inbs
Aged Yak Warrior
860 Posts |
Posted - 2009-01-12 : 07:33:52
|
i have this results from cubes 2006 2007 2008productaa 2 4 3bb 2 5 3 cc 2total 4 8 5 i have a measure that distinct count in the properties-aggreation i just want to make the total (like in the quuery)thanks |
 |
|
|
inbs
Aged Yak Warrior
860 Posts |
Posted - 2009-01-12 : 07:45:59
|
| something like that, i have wrong with that:WITH SET MySet AS {[Measures].[CutomerNo]}MEMBER MEASURES.SETDISTINCTCOUNT AS DISTINCTCOUNT(MySet)MEMBER MEASURES.SETDISTINCTCOUNT AS DISTINCTCOUNT(MySet) SELECT {MEASURES.SETDISTINCTCOUNT} ON 0 FROM [Fact] |
 |
|
|
inbs
Aged Yak Warrior
860 Posts |
Posted - 2009-01-12 : 08:16:21
|
| or something like thatSELECT [DATE].[Year].Dimension On columns,Distinctcount([Measures].[CustomerNumber]) on RowsFROM FactOR Just --------------------------------------------------Distinctcount([Measures].[CustomerNumber]) but the second option give me 0 valuse.i just want to write in correct mdx the querySELECT Count(DISTINCT CustomerNumber)FROM FACTGROUP BY YEAR |
 |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2009-01-12 : 08:26:17
|
| Are you using Microsoft SQL SERVER? Or something else?[Signature]For fast help, follow this link:http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspxLearn SQL or How to sell Used CarsFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
inbs
Aged Yak Warrior
860 Posts |
Posted - 2009-01-12 : 08:37:32
|
| sql server 2000,and builts the cubes in analysis manager |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-01-12 : 09:04:34
|
may be thisWITH SET MySet AS {[Measures].[CustomerNo].MEMBERS}MEMBER MEASURES.SETDISTINCTCOUNT AS DISTINCTCOUNT(MySet)SELECT [DATE].[Year].MEMBERS On columns,MEASURES.SETDISTINCTCOUNT ON ROWSFROM YourCube |
 |
|
|
inbs
Aged Yak Warrior
860 Posts |
Posted - 2009-01-12 : 09:10:52
|
| visakh16,it is not working.may be you have another idea for me |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-01-12 : 09:12:33
|
quote: Originally posted by inbs visakh16,it is not working.may be you have another idea for me
how did customerno got included in measures? it should in one of your dimension |
 |
|
|
inbs
Aged Yak Warrior
860 Posts |
Posted - 2009-01-12 : 09:34:02
|
| i need to count it . |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-01-12 : 10:33:47
|
| http://www.databasejournal.com/features/mssql/article.php/10894_3342491_4/MDX-in-Analysis-Services-Introducing-DISTINCT-COUNT.htm |
 |
|
|
|