BOB: Business Objects Board
Not endorsed by or affiliated with SAP

Register | Login 

Launch Works 
Launch Works (Opens a new window)  

General Notice: No events within the next 45 days.

difference between measure and dimension


 
Search this topic... | Search Semantic Layer / Universe Designer... | Search Box
Register or Login to Post    Forum Index -> Semantic Layer / Universe Designer  Previous TopicPrint TopicNext Topic
Author Message
Nightfox
Senior Member
Senior Member



Joined: 15 Feb 2005

Posts: 45



PostPosted: Tue Mar 01, 2005 8:55 am 
Post subject: difference between measure and dimension

Hi,


I have these 3 objects :

- Object 1 : a dimension with this select code : count(MyTable.myAttribut)
- Object 2 : a measure (projection function : count) with this select code : count(MyTable.myAttribut)
- Object 3 : a measure (projection function : count) with this select code.


What is the difference between these 3 objects ? They seems to have the same behavior (the dimension's one is just not dynamic). But the object 2 and 3 seems to have the same resutls (even they have not the same SQL code)

Thx a lot
Back to top
bernard timbal
Forum Addict
Forum Addict



Joined: 26 May 2003

Posts: 3615
Location: Paris - FRANCE


flag
PostPosted: Tue Mar 01, 2005 9:05 am 
Post subject: Re: difference between measure and dimension

See in designer guide how to use this differents objects types. It is well explained.

measure : it's for amounts and often numeric (miles, amount of money, number of items, incomes) and can be used with an aggregation operator (sum, max, min, average)

Dimension : it's attributs of somethings and often characters (city, name of customer, account number, serial number, year, etc)

its' very strange you have such a dimension : "Object 1 : a dimension with this select code : count(MyTable.myAttribut) "

_________________
Bernard TIMBAL DUCLAUX de MARTIN
BusinessObjects Platform Certified Consultant
Image link
(Co)author of 2 books about SAP BusinessObjects XI3.x and BI4.x Administration
Back to top
Nightfox
Senior Member
Senior Member



Joined: 15 Feb 2005

Posts: 45



PostPosted: Tue Mar 01, 2005 10:56 am 
Post subject: Re: difference between measure and dimension

Hi,

Quote:

measure : it's for amounts and often numeric (miles, amount of money, number of items, incomes) and can be used with an aggregation operator (sum, max, min, average)


Ok but I found 2 ways to build my measure, that seems to give the same results.
- I can create a measure1 with the select code "MyTable.myAttribut" and select the count projection function
or
- I can create a measure1 with the select code "count(MyTable.myAttribut)" and select the count projection function

the measure1 give the following code :
Code:

SELECT
  MyTable.MyAttribut
FROM
  Table  MyTable


the measure2 give the following code :
Code:

SELECT
  count(CORPS_SORTANT.CODE)
FROM
  CORPS  CORPS_SORTANT


However, in the report, I have the same result, namely the number of MyTable.MyAttribut that are in my datawarehouse.

Why 2 differents measures (and os 2 differents SQL Code) can give me the same result ?
Back to top
Andreas
Forum Advocate
Forum Advocate



Joined: 20 Jun 2002

medal_silver.gif*2medal_gold.gif
Posts: 16474
Location: Dreaming of Africa..


flag
PostPosted: Tue Mar 01, 2005 11:23 am 
Post subject: Re: difference between measure and dimension

Quick tip:
For each of your two different measures create a data provider, but include a regular dimension such as Country. You will see the one SQL generated by Business Objects will include a Group By clause, the other won't.

As best practice a measure should always use a SQL aggregate function (sum, max, etc.) in the Select box of Designer.

_________________
Follow me on Twitter

Focusing on Data Visualization, SAP BI 4.0, SAP connectivity, Data Modeling, and SAP HANA Certified Associate
Back to top
Dave Rathbun
Forum Advocate
Forum Advocate



Joined: 06 Jun 2002
ASUG Icon
speaker.gif*16
Posts: 21958
Location: Dallas, Texas


flag
PostPosted: Tue Mar 01, 2005 11:34 am 
Post subject: Re: difference between measure and dimension

By the way, unless you have unusual requirements, you should use the projection function sum when you count. Normally you don't want to count how many count results there are, you want to sum them up.
_________________
Dave's Adventures in Business Intelligence Image link

Latest Blog Posts
• 2014-07-08 Airlines Could Save Millions in Fuel Costs By Providing Everyone An iPad
• 2014-06-24 Did Florida State Win National Championship By Using Big Data?
• 2014-06-07 Business Intelligence Lessons from Star Trek – Part Two
Back to top
Mak 1
Forum Devotee
Forum Devotee



Joined: 06 Jan 2005

Posts: 11082
Location: London


flag
PostPosted: Tue Mar 01, 2005 11:46 am 
Post subject: Re: difference between measure and dimension

You should always use the aggregation function sum, count e.t.c as it improves performance.
Back to top
digpen
Forum Addict
Forum Addict



Joined: 15 Aug 2002

Posts: 2854
Location: Building the next big thing...


flag
PostPosted: Tue Mar 01, 2005 10:43 pm 
Post subject: Re: difference between measure and dimension

Basically you're difference is where the calculations happen. If you just use the select clause with the aggregation project set, all of the calculations are done on your PC. If you have it aggregagte, then the summary is done at the database level. This reduces the amount of information that needs to flow to your machine to get you a results set.

For something small, like the training universes, this isn't a big deal... but say you wanted to count the number of customers or orders and your database had millions of them... then every customer and/or order would be brought down to your machine and counted locally, and you'd be very unpopular with your IT folks.

So... from your example:
1) You will get a single summary number back for every other unique data element combination. (Count of Customers by Year, or by Year and Month, etc).

2) You will Get your same numbers, but when you remove the extra data elements, your report would aggregate incorrectly. Instead of getting a total number of customers for your period of time (ie, summing the counts together), you would display a total number of time elements you returned.

3) You return every value from your database and do the heavy lifting locally.
Back to top
Nightfox
Senior Member
Senior Member



Joined: 15 Feb 2005

Posts: 45



PostPosted: Wed Mar 02, 2005 3:08 am 
Post subject: Re: difference between measure and dimension

OK all, Thanks a lot, without your responses, like you said, I would be very unpopular with my IT folks, and my final users lol.gif

Just for fun, let's see this extra question :

Are there any cases (any requirements) that justify the creation of a measure without aggregation function (so the measure 1 in my previous example) ?
Back to top
Dave Rathbun
Forum Advocate
Forum Advocate



Joined: 06 Jun 2002
ASUG Icon
speaker.gif*16
Posts: 21958
Location: Dallas, Texas


flag
PostPosted: Wed Mar 02, 2005 8:38 am 
Post subject: Re: difference between measure and dimension

Nightfox wrote:
Are there any cases (any requirements) that justify the creation of a measure without aggregation function (so the measure 1 in my previous example) ?

Short answer: No. icon_smile.gif

Measures have a purpose. That purpose is to aggregate / roll up / project or whatever term you want to use. If something does not behave that way then it's not a measure.

But that's just my opinion. icon_wink.gif

_________________
Dave's Adventures in Business Intelligence Image link

Latest Blog Posts
• 2014-07-08 Airlines Could Save Millions in Fuel Costs By Providing Everyone An iPad
• 2014-06-24 Did Florida State Win National Championship By Using Big Data?
• 2014-06-07 Business Intelligence Lessons from Star Trek – Part Two
Back to top
Mak 1
Forum Devotee
Forum Devotee



Joined: 06 Jan 2005

Posts: 11082
Location: London


flag
PostPosted: Wed Mar 02, 2005 10:24 am 
Post subject: Re: difference between measure and dimension

I agree with Dave. If you have an item that will not be required to roll up or makes no sense when aggregated then it should be a dimension, even if it is a form of measure.
I'll give you an example, if you are looking at the cumlative amount of total phone useage, for example, against a particular customer - not time -there will be no value of being able to aggregate these times together becuse the information would be useless......
Back to top
Jamesp
Principal Member
Principal Member



Joined: 12 Oct 2004

Posts: 160


flag
PostPosted: Thu Mar 03, 2005 12:49 pm 
Post subject: Re: difference between measure and dimension

I had a report where object where all count of the number of rows in the table depending on the combination of values in two different columns in the same table. When I used measures and created the report the users where not able to pull in other dimension object and analyze.

So I created dimension objects and now it is running fine. I don't know if it is going to bomb, because all these dimension objects are using count in them.

Any suggestions or similar experiences??


Thanks,

James

_________________
Born Curious
Back to top
digpen
Forum Addict
Forum Addict



Joined: 15 Aug 2002

Posts: 2854
Location: Building the next big thing...


flag
PostPosted: Fri Mar 04, 2005 5:41 am 
Post subject: Re: difference between measure and dimension

James... chances are thee only reason your aggregates didn't work is that your combination was yielding null results. You can't perform math on missing values, so you need to replace those missing values with 0 before moving on. NVL, decode or a case statement (with an else clause) will help you alleviate the issue.
Back to top
Display posts from previous:   
Register or Login to Post    Forum Index -> Semantic Layer / Universe Designer  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT - 5 Hours
 
Jump to:  

Index | About | FAQ | RAG | Privacy | Search |  Register |  Login 

Get community updates via Twitter:

Not endorsed by or affiliated with SAP
Powered by phpBB © phpBB Group
Generated in 0.0528 seconds using 17 queries. (SQL 0.0032 Parse 0.0362 Other 0.0133)
CCBot/2.0 (http://commoncrawl.org/faq/)
Hosted by ForumTopics.com | Terms of Service
phpBB Customizations by the phpBBDoctor.com
Shameless plug for MomentsOfLight.com Moments of Light Logo