Solved

SSAS - COUNT OF A DIMENSION MEMBER

Posted on 2010-09-17
2
1,265 Views
Last Modified: 2016-02-14
Hello Folks,
I am trying to use count of a dimension member as measure.
My purpose is to count the distinct StoreID sales for the specified week of year. I have created a calculated member named StoreCount. And the formula of this calculated member is.



Count(CrossJoin({[Measures].[Sale Unit]}, [Dim Warehouses MAX].Members), ExcludeEmpty)




This calculation show the total count of the Sale Unit measure. But I have filtered this resultset for the week 17. And it still shows the all date range.

Any idea?
0
Comment
Question by:innocent1973
2 Comments
 
LVL 15

Accepted Solution

by:
Tim Humphries earned 500 total points
ID: 33707152
Hi,

Your calculation makes no reference to your date dimension and so will not be fitered by it.

If the query you want to include the calculation in is doing something like:

nonempty( [Dim Warehouses MAX].Members, [Measures].[Sale Unit]) on rows

i.e. showing only those stores that have sales (for a week), then you should be able to just use:


Count(Existing([Dim Warehouses MAX].Members))

as your calculation. Note that this will only work if you include [Dim Warehouses MAX] in the crossjoin in your main query (otherwise there is no set of [Dim Warehouses MAX] to iterate over and you'll get the count of all stores in the dimension).

Tim
0
 

Author Closing Comment

by:innocent1973
ID: 33712418
Thank you
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question