ssas - MDX Query for T-SQL -


i new mdx, can please me mdx query below t-sql

select count(distinct rf.patientid), (d.fiscalyearlong) fiscalyear  [dbo].[referralfact] rf  join [dim].[date] d   on rf.referraldateid = d.dateid  group  d.fiscalyearlong  order fiscalyear desc 

without example of available within cube pure guesswork, might following:

select    [measures].[numpatientid] on columns,    [date].[calendar].[calendar year].members on rows  [yourcube]; 

a date dimension have ordering built in no need explicit use of mdx function order.

also better if used measures calculated within cube, have assumed bi developer has created measure equivalent count(distinct rf.patientid) referenced using [measures].[numpatientid]


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -