SSAS (looking for mdx measure) count distinct customer in a category at a date -
i have implement ssas structure deals customer , newsletter subscription.
i'm dealing kind of simple issue not solve @ now..
here simple extract of 1 of fact table :
date | cat | contact
201401 | nosub | paul
201403 | multi | paul
201602 | mono | jean
201604 | mono | paul
201604 | multi | paul
201609 | nosub | jean
201703 | multi | paul
i want measure (contactnumber) gives me how many contact there within category @ time of request..
i create measure : (dc_contact count distinct of contact)
[measures].[contactnumber] = aggregate( null : [period].[per quarter].currentmember ,[measures].[dc_contact])
but when check in 201703, gives me nosub = 2 (excepted 1) multi = 2 (excepted 1) mono = 2 (excepted 0)
and in 201604 have nosub = 2 (excepted 2) multi = 1 (excepted 0) mono = 1 (excepted 0)
it's quite difficult has lack of details regarding structure of cube should doe using distinctcount (https://docs.microsoft.com/en-us/sql/mdx/distinctcount-mdx)
don't hesitate add more information regarding structure, should help you.
Comments
Post a Comment