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

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -