Aggregate aware function
Hi,
is it possible to apply aggregate aware funtion to derived table
Regards,
Rao
Hi Bona,
This link will help you
http://events.asug.com/2011ASBOUC/5004_Implementing_Aggregate_Awareness_in_SAP_BusinessObjects.pdf
Derived table are created at the universe level.
1. They are usually created to fetch results from tables using a complex
logic condition.
2. To get the Max/ Min date for the data set. Usually used to find the Latest
Data date or Oldest data date etc.
3. Its not a good idea to uses them to aggregate data
Regards
Mustafa
Similar Messages
-
Does Information Designer Tools's aggregate awareness function support OLAP
Hi...
Does Information Designer Tools's aggregate awareness function support OLAP ??
ThanksTo see which ODBC function DG4ODBC is looking for and unixODBC isn't supporting it would be best to get an ODBC trace file. But as your unixODBC driver (unixODBC-2.2.11-10.el5) is outdated and these old drivers had a lot of issues when being used on 64bit operating systems (for example wrong sizeofint etc). So best would be to update the unixODBC Driver manager to release 2.3.x. More details can be found on the web site: www.unicodbc.org
- Klaus -
Aggregate aware function is failing.
Hi,
I have 2 Contexts from which I am retrieving data.
Context 1:
In this Context I have Table1(T1), Table2(T2), Table3(T3). Where joins are as follows:
T1->T2->T3
Context2:
In this Context I have Fact table(FT1) where joins are:
FT1->T2
I have created a Measure where I have applied Aggregate Aware as follows:
@Aggregate(T1\m1,FT1\m1)
Now,
When I use Dimension created on T3 with this measure it creates 2 queries as follows:
Q 1: select d1 from T3
Q 2: select m1from FT1
Its not getting redirected to measure created on T1.
We have couple of more contexts similar to above in universe and it works fine with it. However, not sure why its not working in this case.
Thanks in advance for your help.Hi Bona,
This link will help you
http://events.asug.com/2011ASBOUC/5004_Implementing_Aggregate_Awareness_in_SAP_BusinessObjects.pdf
Derived table are created at the universe level.
1. They are usually created to fetch results from tables using a complex
logic condition.
2. To get the Max/ Min date for the data set. Usually used to find the Latest
Data date or Oldest data date etc.
3. Its not a good idea to uses them to aggregate data
Regards
Mustafa -
@aggregate aware or Derived Tables ..
Hello,
the original data in my Universe has about 2 Mio. i have 2 questions ..
is there any reference values for best performance of a universe (e.g 1. Mio rows .. what ever)
how can i get best performance: @aggregate aware or with derived tables .. (other Alternatives)
Production DB: Oracle
BOXIR2 SP 4Hi,
You can get better performance with aggregate awareness, but you need the aggregate tables in the db.
As a brief overview consider a table prod_cust_order (1million rows)
Product, Customer, Order Amount
This could be aggregated to product_order Product, Order Amount (500 rows)
If the user wants to see order amount by customer then they are going to have to query the original table, but if they are interested in product only they they can go to Product_order table.
The aggegrate awareness allows you to create a measure object with both tables as the source, and will then select the approriate one when building the query based on the dimension you have selected. So if the user selects customer then it will go to the top prod_cust_order but if they don't it will source it from the much smaller Product_order table. The user does not see the change in WebI unless they look at the underlying SQL.
Derived tables are not so good for performance as the enter derived query is included in the SQL built.
Regards
Alan -
Aggregate awareness: please help
HI OBI gurus.
I dont know what i am missing, but no discussion group giving detailed explanation on how to create aggregate awareness in OBI. i have been trying to figure out this but utterly failing. I know i am dumb but something is missing somewhere please help. Here I am explaining what i am trying to achieve including examples below. Please help.
Suresh
OBI Version: 10.1.3.3
DB Model
Area Dim Table,
Country,
State
City
Fact Tables (3 Fact tables)
1. Country wise Sales (Country Code, Sum Sales)
2. State wise Sales (State Code, Sum Sales)
3. City wise Sales ( City Code, Sum Sales)
Please let me know how i can join the above tables in physical and bmm to achieve this.
If i create a report for Country, State Sum Sales. The query should be populated like this.
select country, state, sum(sales)
from area_dim, sate_wise_sales_fact fact
where area_dim.state_code= fact.state_code
group by country, state
If i want to create a report for Country, State, City Sum Sales. The query should be populated like this.
select country, state, city, sum(sales)
from area_dim, city_wise_sales_fact fact
where area_dim.city_code= fact.city_code
group by country, state, city
Should choose different fact tables for different lovel level dim.
Thanks and Regards
Suresh$ uresh
You changed UserName from slella to $ uresh!! You want free from Garry and me
I thought to response to your post, i realized its you and your free
https://forums.oracle.com/thread/2558637
Looks like you for got your old post out of 4 answered 2 are from me.. have fun
~ cool-bi.com -
SQL statement using result of aggregate min function to fetch a row - how?
Need help trying to get to something seemingly simple. I'll provide a simple example to illustrate the problem.
I'll be using a simple addresses table with 4 fields.
Create the table:
CREATE TABLE "ADDRESSES"
( "OWNER_NAME" VARCHAR2(20 BYTE),
"STREET_NAME" VARCHAR2(20 BYTE),
"STREET_NUMBER" NUMBER
) ;populate with 6 rows
Insert into ADDRESSES (OWNER_NAME,STREET_NAME,STREET_NUMBER) values ('FRED','MAIN',1);
Insert into ADDRESSES (OWNER_NAME,STREET_NAME,STREET_NUMBER) values ('JOAN','MAIN',2);
Insert into ADDRESSES (OWNER_NAME,STREET_NAME,STREET_NUMBER) values ('JEAN','MAIN',3);
Insert into ADDRESSES (OWNER_NAME,STREET_NAME,STREET_NUMBER) values ('JACK','ELM',1);
Insert into ADDRESSES (OWNER_NAME,STREET_NAME,STREET_NUMBER) values ('JANE','ELM',2);
Insert into ADDRESSES (OWNER_NAME,STREET_NAME,STREET_NUMBER) values ('JEFF','ELM',3);We now have this:
Select * from addresses
OWNER_NAME STREET_NAME STREET_NUMBER
FRED MAIN 1
JOAN MAIN 2
JEAN MAIN 3
JACK ELM 1
JANE ELM 2
JEFF ELM 3
6 rows selectedNow i wish to group by StreetName, and get a count of houses. At the same time, i'd like to know the first and last house number
select
street_name,
count(*) "NBR HOUSES",
min(street_number) "First Number",
max(street_number) "Last Number"
from addresses
group by street_name
produces
STREET_NAME NBR HOUSES First Number Last Number
ELM 3 1 3
MAIN 3 1 3
2 rows selectedExcellent. Now for the problem. I wish to also list on each line, the owner that lives at the first and/or last house number. Note again, assume that house number and street name is unique
It would seem i have all that i need. Not sure how to get at it.
I tried:
select
street_name,
count(*) "NBR HOUSES",
min(street_number) "First Number",
max(street_number) "Last Number",
(Select b.owner_name from addresses b where b.street_number = min(street_number) and b.owner_name = owner_name) "First Owner"
from addresses
group by street_nameBut get a sql syntax error, group function not allowed when i add the subselect.
any ideas?
thanks for any help.
Edited by: user6876601 on Nov 19, 2009 7:08 PM
Edited by: user6876601 on Nov 19, 2009 7:30 PMHi,
Welcome to the forum!
Getting the highest and lowest number for each street is a fairly simple concept; simpler to describe, and simple to code.
Now you want the owner_name associated with the highest and lowest number, which is a more complicated concept; a little harder to describe, and, unfortunately, much less simple to code, and much, much harder to explain:
select
street_name,
count (*) "NBR HOUSES",
min (street_number) "First Number",
min (owner_name) KEEP (DENSE_RANK FIRST ORDER BY street_number)
"First Owner",
max (street_number) "Last Number",
min (owner_name) KEEP (DENSE_RANK LAST ORDER BY street_number)
"Last Owner"
from addresses
group by street_name
;Notice that I used min for both "First Owner" and "Last Owner". Why is that?
The important keyword in these funtions is the word FIRST or LAST that comes after DENSE_RANK and before ORDER BY. The function at the beginning is merely a tie-breaker.
That is, MIN in this context only refers to what should happen when there is a tie for the first or last in the group. Even if such a thing is impossibe in your data, the generic functions have to have some mechanism for returning a single owner_name when two or more rows have an equal claim to having the highest street_number. For example, if we change Joan's address to 1 Main, then MIN (street_number) is still 1, obviously, but who is the person associated with the minimum street_number: is it Fred or Joan? Both have an equal claim to being the owner with the lowest address on Main Street, but aggregate functions must return a single value, so we have to have some mechanism for tell the system whether to return 'JOAN' or 'FRED'. In this example, I arbitrarily said that in the een of a tie, the lowest name, in alphabetic order, should be returned. In this case, 'FRED' would be returned, since 'FRED' is earlier than 'JOAN' .
Thanks for including the CREATE TABLE and INSERT statements! -
Can window and aggregate SQL functions used in Pro*C embedded SQL?
It appears that the window functions such as dense_rank() over(partition by ... order by ...) are not available in Pro*C embedded SQL. Can somebody please confirm that that is really the case?
Thanks
Rawender GuronPlease refer to this thread: "Is this forum also used for Pro*'C Questions? "
Is this forum also used for Pro*'C Questions? -
Can window and aggregate SQL functions be used in Pro*C embedded SQL?
It appears that window functions such as dense_rank() over(partition by ... order by ...) can not be used in Pro*C embedded SQL? Can somebody confirm that that is really the case?
Thanks
Rawender GuronPlease refer to this thread: "Is this forum also used for Pro*'C Questions? "
Is this forum also used for Pro*'C Questions? -
Aggregate Create Function Module??
Hi,
Does any one know of either a program or a FM that creates an aggregate based upon the values you pass to it??
Regards,
Mike LevitesHi,
Found this unreplied question, I have got the same requirement. Anyone?
Regards
PR -
Complex Aggregate Aware Problem
I am facing issue with @AA() in following the scenario.
I have a measure with following definition:
m1= @AA(FT1\ftm1,AT1\atm1,AT2\atm2,FT2\ftm2)
Where,
AT1\atm1=@AA(ATA1\atam1,ATA2\atam2)
Similar definition is also applicable for dimensions from AT1
AT1\atd1=@AA(ATA1\atad1,ATA2\atad2)
I have marked the ATA1 and ATA2 incompatible with all the objects derived from FT1 and FT2 and vise verse.
Definition of Dimension object from AT1 is as follows:
atd1= @AA(ATA1\atad1,ATA2\atad2)
There is another dimension table related to all the tables.
FT1->DimA1
FT2->DimA1
ATA1->DimA1
ATA2->DimA1
Now, When I drag dimension DimA1,AT1 and measure m1 it creates 2 queries as:
Q1: select DimA1,ATA2 from DimA1,ATA1
Q2: select DimA1,FT1\ftm1 from DimA1,FT1
Its very tedious but this is the most simplest version in which I can describe...Hi
Look what I have done:
1) Here is view of my JSF Page and components: http://img695.imageshack.us/img695/4218/21964358.jpg
On the left there is my Data Control for Web Service. The input is simple Integer and the results are many rows (here is result form EM console test: http://img41.imageshack.us/img41/8803/23008039.jpg )
The input value form is made by drag and drop entire execute(Integer) as ADF Parameter Form. The id of execute button is cb1.
The results are made by drag and drop PassDetails as ADF Read Only Table.
2) I did a Create Method Binding For Action for execute button as you suggested. Adding New Bean: [Bean Name - BindingMethod] [Class Name - BindingMethod] [Scope - request]. It was created a java file as seen on this picture - http://img11.imageshack.us/img11/8192/17868604.jpg I've added your code.
3) I've also put Refresh Condition: #{adfFacesContext.initialRender} for PassDetailsIterator - http://img35.imageshack.us/img35/2271/85080775.jpg
Thats all I've done. When running page the ADF Table is not fetching data. When I enter Input Value there are no results in ADF Table, but the instance of my web service is completed.
When I put Refersh Condition #{!adfFacesContext.initialRender} it automatically fetchind data.
What should I change in my application? Please help?
Best regards MK. -
Hi,
I have 20 tables in universe, there are some isolated tables, Now I created 4 alias tables of table X (existing one)(new alias tables are A,B,C,D) then joined new table E and Joined Many to One to (E-A,E-B,E-C and E-D).Now If I drag One Objects from class E and Class A or B or C or D u2026its getting synchronized.
These two objects in my universe and they are from the same data provider (meaning they are objects under same universe but under different classes). When I bring the objects from these two different classes in the query panel, I get two queries in my view sql. Please let me know how I can avoid this synchronization? Both are dimensions objects and each have same datatypes in db and in universe respectively, but I am not sure why they r getting synchronized and there is proper join also. Please, can anyone help me? Can data issue in one of the tables cause a query to synchronize ?
PS: I have not defined any aggregate awareness function in any of the class.
Thanks!
Sanjeev GubyadHi Sanjeev,
Have you defined context which includes all the joins?
If not please deine a context and then export the universe.
Regards,
Rohit -
How to resolve the loop in universe level
how to resolve the loop in universe level
Hi, Kashim
In univese level loops resolved by Chasm Trap and Fan Trap methods.
Chasm Trap: A chasm trap is a type of join path between three tables when two many-to-one joins converge on single table, and there is no context in place that separate the converging join paths.
There is "many-to-one-to-many"relationship beween the three tables in the universe structure.you can define a context for each table at the many end of the joins.
A chasm trap is not dependent on the object types, the query could be made up of only dimensions,only details,or only measures,or any combination of the three types with the "many " tables for chasm to occure.
you can also detect the chasm trap Automatically, tool---->Detect context
To resolve the chasm trap, you need to make two separate Queries and than combine the results Depending on type of objects defined for the fact tables and the type of end user environment,
Fan trap: it is occured when there is a "one-to-many" join to the table that "fans out " into another "one-to-many" join to another table.
Avoid fan trap: The first place by relating all measure objects in the universe to the same table in the universe structure,Avoid placing a measure on anything other than the last table in a in a table path, which is the table with the "many" cardinality attached to it.
This methods is not recomended as it only works for measure objects and may result in inefficienies in processing the query. This resolution works the same for chasm and fan traps.
you can create more alias tables based on your requirement in single universe. and it is true conext, when two or more paths.
Theese methods also apply for resolving loops:
Short cut join also one method for resolving loops
Aggregate aware function used another waty for resolving loops
if you are not resolving the loop result is redusing the number of records. -
Incompatible Objects in Designer
Hi,
I am having 4 Folders(classes) in my Universe, how to set incompatible objects.
Ex:
Folder1:
Folder2:
Folder3:
Folder4:
Compatible folders(combination):
1-->Folder1 & Folder2
2-->Folder1 & Folder3
3-->Folder1 & Folder4
If i selected one object from Folder2 & another object from Folder3, then it will show incompatible objects
If i selected one object from Folder3 & another object from Folder4, then it will show incompatible objects
If i selected one object from Folder2 & another object from Folder4, then it will show incompatible objects
Please give me solution.
Thanks,
N PraveenHi,
Cause
This error is caused by any of the following problems in the definition of the universe:
There are incompatible objects in the universe and the universe designer did not set the option that allows multiple SQL statements for each context.
There are no contexts in the universe and the query has created a loop.
The query objects exclude all possible SQL choices for an aggregate aware function.
The universe contains an object which references more than one table on separate contexts.
Action
The universe designer needs to make appropriate modifications to the universe with Designer.
Detect For Loops Or Aliases in your Universe .
Check The structure for Folder 2 & Folder 3 Objects (same for other).
Please Check The Links Below.
http://www.forumtopics.com/busobj/viewtopic.php?t=93487
encountered Incompatible combination of objects (QP0004) error! -
Use Aggregate Functions in a View
Is it possible to create a view in SE11 using an aggregate SQL function?
I.e., I want the generated SQL to look like:
CREATE VIEW z_tbl
A,
SUM_AMT
AS SELECT
A,
SUM(AMT)
FROM TBL
GROUP BY A
Thanks for any help.Executes the Native SQLstatements enclosed between EXEC SQL and ENDEXEC statements. Unlike Open SQLNative SQL statements can address tables that are not declared in theABAP Dictionary.
Example
Creating the Table AVERI_CLNT:
EXEC SQL.
CREATE TABLE AVERI_CLNT (
CLIENT CHAR(3) NOT NULL,
ARG1 CHAR(3) NOT NULL,
ARG2 CHAR(3) NOT NULL,
FUNCTION CHAR(10) NOT NULL,
PRIMARY KEY (CLIENT, ARG1, ARG2)
ENDEXEC. -
Aggregate function in the query
Hi gurus,
What makes presentation layer send queries with Aggregate( by ) function eventhough this function is not used in the column formulas?
Now comes a long explanation - only for the patient ones :-)
I am working OBIEE / Essbase.
A strange thing happened to one of my reports - exactly the same report (pivot) in production (old repository) works fine, but brings wrong results on the new repository.
I found out that SQL sent to OBIEE is different.
With old repository, it sends a query with 'Aggregate ( by)' function used for measures. However with the new one, it sends just column names without the Aggregate.
Where shall I look for the difference?
-- OLD (Good) query -----------
SELECT DIM_BATCH_HEADERS."Gen3,DIM_BATCH_HEADERS" saw_0,
PROD_QTY.PROD_ACTUAL_QTY_KG/1000 saw_1,
DIM_COMPONENT."Gen3,DIM_COMPONENT" saw_2, ' ' saw_3,
COST.COMP_ACTUAL_COST_ILS_PER_TON saw_4, 0 saw_5,
COST.ACTUAL_COST_K_ILS saw_6, 0 saw_7,
AGGREGATE(saw_1 BY ),
AGGREGATE(saw_4 BY ),
AGGREGATE(saw_6 BY ),
AGGREGATE(saw_1 BY saw_0, saw_5),
AGGREGATE(saw_4 BY saw_0, saw_5),
AGGREGATE(saw_6 BY saw_0, saw_5)
FROM "COP_MAAD#1" WHERE (COMP_QTY.COMP_RELEVANT > 0)
AND (DIM_TIME."YEAR" = '2009')
AND (DIM_BATCH_HEADERS."Gen2,DIM_BATCH_HEADERS" = 'ABC')
ORDER BY saw_1 DESC, saw_4 DESC, saw_0, saw_2, saw_3, saw_5, saw_7
-- NEW (Incorrect) Query ---------------
SELECT DIM_BATCH_HEADERS."Gen3,DIM_BATCH_HEADERS" saw_0,
PROD_QTY.PROD_ACTUAL_QTY_KG/1000 saw_1,
DIM_COMPONENT."Gen3,DIM_COMPONENT" saw_2,
' ' saw_3, COST.COMP_ACTUAL_COST_ILS_PER_TON saw_4,
0 saw_5,
COST.ACTUAL_COST_K_ILS saw_6,
0 saw_7 FROM "COP_MAAD#1"
WHERE (COMP_QTY.COMP_RELEVANT > 0) AND (DIM_TIME."YEAR" = '2009')
AND (DIM_BATCH_HEADERS."Gen2,DIM_BATCH_HEADERS" = 'ABC') ORDER BY saw_1 DESC, saw_4 DESC
Thanks,
AlexHi,
Can anybody reply to the above question please?
regards,
Siva
Maybe you are looking for
-
HELP!!!!
-
SSIS Package developed in SQL Server 2008 R2 Using BIDS 2008 is not working in SQL Server 2012
I am working in a Product based company. We have given a Pre-requisites to our customers like SQL Server version should be 2008 or later. I have developed and deployed my SSIS package in SQL Server 2008 R2 with BIDS 2008. I have used "Script Componen
-
Hi All, I have a requirement for a report in which I have to display the "sales" of the last working day and the "costs of sales" for it and also the sales and costs of sales for the total month(i.e from 1st day of the month till last working day). I
-
Using logic as host application for omnisphere
Hey i am kind of new at using plug ins with programs like logic. I just can't figure out how to use set up logic as the host for omnisphere. If someone could help me out that would me much appreciated. Thanks.
-
Best Way to gather statistics in 10g
Hi All, What is the best way to gather optimizer statistics in 10g databases? We are currently following the default automatic statistics gathering feature of 10g. But we feel it has got some shortcomings. For many of the tables the stats are not up