Count distinct

Who is online?  0 guests and 0 members
Home  »  Forums   »  microsoft business intelligence   »  bi query languages (mdx, dmx)   » Count distinct

Count distinct

Topic RSS Feed

Posts under the topic: Count distinct

Posted: 11/28/2011

Padawan 136  points  Padawan
  • Joined on: 7/8/2011
  • Posts: 58

Hi guys,

This question might seem a bit stupid to you. I have a fact table representing financial transactions. One of the dimensions is the card number. I need to count the number of distinct cards that made transactions for a given period and a given store. I want to create a calculated member, but I have no idea how to do it. Can you give me any help?

Thanks

Felipe


Posted: 11/30/2011

Jedi Knight 1516  points  Jedi Knight
  • Joined on: 1/3/2010
  • Posts: 266
Answered  Answered

Don't know if I'm seeing the "whole picture".

Can't you just creat a measure group linked to the card_number and select countdistinct as the aggregated function?


Posted: 11/30/2011

Padawan 136  points  Padawan
  • Joined on: 7/8/2011
  • Posts: 58

Thanks, I'll try this.


Posted: 11/30/2011

Padawan 136  points  Padawan
  • Joined on: 7/8/2011
  • Posts: 58

It was SO easy... I've been wrestling with this a day and a half... Laughing

I guess it's the price to pay for learning.


Posted: 11/30/2011

Jedi Knight 1516  points  Jedi Knight
  • Joined on: 1/3/2010
  • Posts: 266

glad it was helpfull.


Posted: 1/16/2013

Jedi Youngling 2  points  Jedi Youngling
  • Joined on: 6/27/2011
  • Posts: 1

with member [DistCount] as

distinctcount(exists([Company].[Company Name].children,[Measures].[Spend in USD]))
Select {
    [Measures].[DistCount]} on 0

From Cube Name


Page 1 of 1 (6 items)