473,806 Members | 2,236 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Incorrect Counting Total -SSAS

2 New Member
Hello,





Im a new user of SSAS and at the moment im trying to browse a cube to output the total of contacts within a criteria.

I have one measure(fact table) named Contacts Count and 4 Dimensions Contact Addresses;Addre sses; Countries and Contact Categories. The Contact Addresses and Addresses dimensions have got Regulars Relationships(f rom PK to FK) with the fact table, the Countries Dimension is using a Referenced relationship to the measure from the Addresses dimension and the Contact Categories use a regular relationship(fr om PK to FK).



When the cube is processed(after choosing "use custom error configuration" in the dimension key errors) the total of contacts is "8727" on the Drop Totals field is the same(Total of rows) as if we queried the following way:



"SELECT DISTINCT c.contact_numbe r

FROM dbo.contacts AS c INNER JOIN

dbo.contact_add resses AS ca ON c.contact_numbe r = ca.contact_numb er

AND c.address_numbe r = ca.address_numb er

INNER JOIN

dbo.addresses AS a ON c.address_numbe r = a.address_numbe r

INNER JOIN

dbo.countries AS co ON a.country = co.country

INNER JOIN

dbo.contact_cat egories AS cc ON cc.contact_numb er = c.contact_numbe r



In my case i need to dimension the data by Countries and filter by "Activity" that is an atriibutte of the Contact Categories dimension.



If for example we use the query:

"SELECT DISTINCT c.contact_numbe r, cc.activity

FROM dbo.contacts AS c INNER JOIN

dbo.contact_add resses AS ca ON c.contact_numbe r = ca.contact_numb er

AND c.address_numbe r = ca.address_numb er

INNER JOIN

dbo.addresses AS a ON c.address_numbe r = a.address_numbe r

INNER JOIN

dbo.countries AS co ON a.country = co.country

INNER JOIN

dbo.contact_cat egories AS cc ON cc.contact_numb er = c.contact_numbe r

WHERE (cc.activity = 'BCRS') and

(co.country_des c = 'United Kingdom')"



The total of rows is 4282 but on the browse cube when we filter by activity = "BCRS" the total for United Kingdom is only 219. And also if i browse with a new dimension( fact relationship) "contacts" and select for example the attribute contact_number = "9998" the total counts is 1 (instead of 4) if we query(SELECT c.contact_numbe r, cc.activity...W HERE c.contact_numbe r = '9998'" the output is 4 rows because this contact has got 4 different type of activities(BCRS , BCTYPE...).





Im not sure if i can use cubes to pull out this kind of information and i would like some help with the above case.



Thanks in advance.



Joao.
Aug 29 '07 #1
0 1233

Sign in to post your reply or Sign up for a free account.

Similar topics

3
1969
by: Megan | last post by:
hi everybody- i'm having a counting problem i hope you guys and gals could give me some help with. i have a query that retrieves a bevy of information from several different tables. first let me give you a little background. this database is kind of like a human resources database. it collects info about people, where they work, and if they have any work-related issues where they work.
1
2829
by: mjobrien | last post by:
Thanks for the hint Allen (see below). But I am already doing that count as total records read (5)in the report footer. That count is unduplicated for the record not for the field - student ID as I've indicated in my sample report. I really need an unduplicated count of the student ID only. I guess my subject was not clear. ------------------------------------------------------------------------------ From: Allen Browne...
18
2950
by: ChadDiesel | last post by:
I appreciate the help on this group. I know I've posted a lot here the last couple of weeks, but I was thrown into a database project at my work with very little Access experience. No other employee knows anything about Access. I've searched Google Groups, and that has been a lot of help, but there are some questions that I just can't find the answer to. I'll try to take it easy on the group after this question. I have one more...
1
6934
by: j | last post by:
Hi, I've been trying to do line/character counts on documents that are being uploaded. As well as the "counting" I also have to remove certain sections from the file. So, firstly I was working with uploaded MS WORD .doc files. Using code like that below: strLine = sr.ReadLine While Not IsNothing(strLine) 'Not eof If Trim(strLine) <> "" Then 'Not blank
1
8861
by: Jerry | last post by:
We have a 10-question quiz for kids, each question being a yes or no answer using radio selections. I'd like to keep a current total of yes's and no's at the bottom of the quiz (if the user selects yes to question 1, the total of yes's increases by 1). I've been searching for a while but I'm not sure I'm searching with the right keywords. Can anyone direct me to a source I can review to learn how to do this? Thanks! --
3
16943
by: viewsonic | last post by:
Help, im a student that has to write a program for counting coins. Half of the program works but the other half doesn.t should have the following parameters. output is: Name Date total number of coins number of quarters number of dimes
27
5633
by: Simon Biber | last post by:
I was reading http://en.wikipedia.org/wiki/Poker_probability which has a good description of how to count the frequency of different types of poker hands using a mathematical approach. A sample Python program is given in the discussion page for doing it that way. I wanted to take a different approach and actually generate all the possible hands, counting the number of each type. It's quite do-able on today's hardware, with 5-card...
11
1499
by: Andy | last post by:
Hi, the file below will print all the keywords in a file and also the line # of the keyword. What I couldn't figure out is to count those keywords per line. For example - "Line #1 has 3 keywords" Can I do like - total = total + numwords(k) "Line number %d has %d keywords" % (j, total) Seems sort of "illegal" in Python?
8
5278
by: xiaolim | last post by:
i making a simple program to count the different kinds of characters in a text file and then display them out, however i only manage to count the total numbers of characters. #include <iostream> #include <cstring> #include <fstream> #include <conio.h> #include<stdio.h> #include <string.h>
3
1516
by: nitric | last post by:
hey guys, i'm really stuck on this program. It's basically a survey and I have to ask people what drinks they like. 1-4, coffee tea oj and lemonade. i'm having trouble counting the TOTAL NUMBER OF PEOPLE and counting how many people pick coffee tea oj or lemonade. i have the 5th option set as a sentinel, where the program ends. i need help like i said counting the total number of people who participated(person who quits doesn't...
0
9718
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10617
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10109
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7649
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6876
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5678
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3849
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.