Dynamically Selecting Hierarchy Nodes for each year
Hi All,
I have a strange query requirement. I am having a hierarchy which is divided based on region, quarter and marketing campaign.
Like below:
APAC
2010 Q1
Brand Marketing M09/2010-000074 (Node Technical Name)
Brand Advertising M09/2010-000075
Events M09/2010-000082
EMEA
2010 Q1
Brand Marketing M09/2010-000084
Brand Advertising M09/2010-000085
Events M09/2010-000086
NA
2010 Q1
Brand Marketing M09/2010-000098
Brand Advertising M09/2010-000099
Events M09/2010-000106
In my report output, I need to display the data in the below format. The Brand Marketing is cumilative of all regions (APAC, EMEA, NA).
Approved Amt
Brand Marketing $2000
Brand Advertising $1300
Events $8430
But my issue is next quarter the node technical names will change. So next quarter, my query should pick the nodes of current quarter based on node description.
Right now what we are doing is hard coding in query the node technical names and modifying the query definition every quarter. After that download the query in Excel and apply excel formulae to cumulate the Brand Marketing, Brand Advertising, Events of all the regions. Then we will mail those files to Users.
But we want to avoid that manual activity.
Is there any way that we can enable query pick the marketing campaigns of current quarter and cumulate then for all regions
Please let me know whether there is any alternative.
Thanks
Hi John,
We are having a level based hierarchy, so the member key settings are disabled. Will they be helpful in case of level based hierarchy?
Thanks,
Sreekanth
Edited by: JUPS on Sep 13, 2011 11:00 PM
Similar Messages
-
Accommodate structure changes in Budget Application for each year
every year our cost center structure changes to accomplish that we are creating New Budget Application every year . Cost center structure is divided in to Area then region and then csc. These Regions never stays under same Area they change it every year
can anyone suggest out a way to do it in only one Budget Application instead of creating new Application every year ?
How can we Accommodate structure changes in Budget Application for each year?
thanks in advance for the suggestionsAssuming the cost centers stay the same, and only the hierarchy of the dimension changes, it's really quite simple.
Export the level 0 data, clear the database, update outline, import the level 0 export file, agg database. You should now have the new totals.
All of this can be done in place without the export/import of data as well, but it is a good practice to export/clear db/import the data for defrag purposes.
Some things to consider, if the organization will want to compare year over year company totals...
1. They need to create some governance around newly inactive cost centers, usually you create some sort of "Inactive" parent in the dimension and when they are no longer active they need to be reassigned to this "inactive" parent. This will ensure that at least the company total stays the same.
2. Following #1, they need to understand that the year over year totals will may only be accurate at Company total (including the Inactive rollup) and at cost center.
Robert -
Run Time Error when trying to select hierarchy node
Hy all,
the situation is the following:
i attempt to create a variable of type "hierarchy node" (for cost center cha) in my planning area, i used the replacement type "user defined value", check on "input allowed by user" and then i create the user entry, in selection condition i run match code and when i try to select a single cost center (not a hierarchy node) expanding the hierarchy tree the system goes dump with the following message:
Runtime Errors MESSAGE_TYPE_X
Error analysis
Short text of error message:
Program is inconsistent -> see long text
Technical information about the message:
Diagnosis:
An inconsistent program status has occurred. The program cannot be continued.
System response:
The system crashes.
Procedure
1. Look in OSS for a note under the error message UPC099.
2. When you open a problem message, send the first pages of the
system crash message including the section 'Source code excerpt
' with the message.
Procedure for System Administration
Message classe...... "UPC"
Number.............. 099
Selecting a hierarchy node (not a single cost center but a text node grouping more cost conter) this problem does not occur.
I appreciate (and reward) any hints.
Thanks in advance
FabioHi,
Go through the oss notes with error message UPC099
Dump during hierarchy selection:<b>536694</b>
Dump when reading a hierarchy with intervals :<b>423953</b>
Regards-
Siddhu
Message was edited by: sidhartha -
MDX Query for Average customer first sale amount for each year
Hello,
I new to MDX, and I am looking to build a query that would get all the first sale amount for the customes and average that. The intent is to use find an average each year. I am looking to use this against the adventure works database.
I am not sure exatcly how to start this . Any help is much appreciated.
JHi,
I'll do it in several stages.
let's first define an ordered set of date/sale to one customer over all periods:
SELECT
{[Measures].[Internet Sales Amount]} ON 0
NonEmpty
[Date].[Calendar].[Date]
[Customer].[Customer].&[15561]
,[Measures].[Internet Sales Amount]
,[Customer].[Customter].&[15561]
) ON 1
FROM [Adventure Works];
we retain the first line of the result set with item(0):
SELECT
{[Measures].[Internet Sales Amount]} ON 0
NonEmpty
[Date].[Calendar].[Date]
[Customer].[Customer].&[15561]
,[Measures].[Internet Sales Amount]
,[Customer].[Customer].&[15561]
).Item(0) ON 1
FROM [Adventure Works];
next, for each year we define a measure that will retain the first sale for each customer
(I limit the customer set to the first 2000)
WITH
MEMBER [Measures].[Mymeasure 2006] AS
NonEmpty
Exists
[Date].[Calendar].[Date].MEMBERS
,[Date].[Calendar].[Calendar Year].&[2006]
[Customer].[Customer].CurrentMember
,[Measures].[Internet Sales Amount]
,[Customer].[Customer].CurrentMember
).Item(0)
,[Measures].[Internet Sales Amount]
MEMBER [Measures].[Mymeasure 2007] AS
NonEmpty
Exists
[Date].[Calendar].[Date].MEMBERS
,[Date].[Calendar].[Calendar Year].&[2007]
[Customer].[Customer].CurrentMember
,[Measures].[Internet Sales Amount]
,[Customer].[Customer].CurrentMember
).Item(0)
,[Measures].[Internet Sales Amount]
SELECT
[Measures].[Mymeasure 2006]
,[Measures].[Mymeasure 2007]
} ON 0
,NON EMPTY
Head
[Customer].[Customer].[Customer]
,2000
) ON 1
FROM [Adventure Works];
We then take the average for each year:
WITH
MEMBER [Measures].[AVG cust first sale 2006] AS
Avg
Head
[Customer].[Customer].[Customer]
,2000
NonEmpty
Exists
[Date].[Calendar].[Date].MEMBERS
,[Date].[Calendar].[Calendar Year].&[2006]
[Customer].[Customer].CurrentMember
,[Measures].[Internet Sales Amount]
,[Customer].[Customer].CurrentMember
).Item(0)
,[Measures].[Internet Sales Amount]
MEMBER [Measures].[AVG cust first sale 2007] AS
Avg
Head
[Customer].[Customer].[Customer]
,2000
NonEmpty
Exists
[Date].[Calendar].[Date].MEMBERS
,[Date].[Calendar].[Calendar Year].&[2007]
[Customer].[Customer].CurrentMember
,[Measures].[Internet Sales Amount]
,[Customer].[Customer].CurrentMember
).Item(0)
,[Measures].[Internet Sales Amount]
SELECT
[Measures].[AVG cust first sale 2006]
,[Measures].[AVG cust first sale 2007]
} ON 0
FROM [Adventure Works];
Philip, -
No applicable data : when selecting hierarchy node on 0GLACCEXT
Hi,
I using the ZCUBE (Copy of virtual cube 0FIGL_V10).
I have data for the 0GLACCEXT hierarchy (standard hierarchy tech name: INT, and also for custom hierarchies)
From the moment we use a selection in the rows on a node within the hierarchy of the financial statement item : 0GLACCEXT, the result is No applicable data.
We are using the standard calculated key figure Balance sheet Value.
If i use the hierarchy (for INT) as a whole, we get data. If i restrict with hierarchy nodes for INT, then 'No Applicable Data'.
for the other custom hierarchies, i'm getting same result, i.e. 'No Applicable Data'.
Can somebody help with this issue.
Thanks,
VHi
Find out whethere data exists actually for the nade by executing the data for all the hierarchy nodes and find out whether data is coming when you execute for some other nodes
Regards
N Ganesh -
How to provide a list of Hierarchy-nodes for selections?
Hi specialists,
some of our users often want to use some hierarchy-node-values from one report as filter of a 2nd report.
For all non-hieararhy-values it is possible to do that using the clipboard.
But there seems not to be a way to do the same with hierarchy-nodes.
Is there any workaround to reach that target?
Btw: I'm talking about users using the BEx 3.5 Analyzer.Hello,
was this problem resolved?
can you please temm me how you resolved this issue?
Actually I also am having similar requirements in the project.
Thank you. -
Dynamically select detail report for a master report link item or button?
I'm still new to APEX, so apologies if this sounds like a stupid question, but so far I can't find anything online about how to do the following.
I have a simple report, and I want to be able to drill down from here to a detail report via a link item (or a button) in each row. The problem is that the specific detail report to use depends on a combination of values in the parent record.
So if I have a parent record in the master report with values for columns 1/2/3 of A/B/C, I would drill down to a detail report against table X. If my parent record has values of D/E/F, I might drill down to a different detail report against table Y.
I can build the individual reports easily enough, and I can set up a link item in the master report to drill down to a hard-coded detail report page. I can even generate the name (alias) of the relevant target report as an extra non-DB item in each row of the parent report. But I can't figure out how to allow each row in the parent report to actually link to a different detail report dynamically, depending on the contents of the parent row.
Can anybody suggest an easy way to do this, or point me towards an online resource that would explain how to do this (preferably in basic terms that this APEX-newbie can understand)?
Thanks for your help!Hi,
When you say "Detail report" do you just mean a normal report of the child records for the selected master record or a tabular form style "Details report"?
Using different reports on a page would, typically, depend on the value in a hidden page item - for example, P1_REPORT_TYPE. Your link could pass an appropriate value into this item and the second page would then use this as a Condition for each of the report regions - each region being conditionally displayed when the hidden item is a specific value.
Andy -
How to set property nodes for each of the multiple y-axes?
In Labview 6i, I have set up multiple y-axes on an xy graph. I want to change certain properties of each of the 2 y-axes independently. I believe I can do this using "property node".
However, after I have created a property node for the xy graph, I realised that there is only 1 y-axis selectable from the list of properties. How can I set the property of the other y-axis then?
Thanks for the help!I believe there is a property called "active graph"... this allows you to
select the active graph to apply the property changes to...
Later...
meng118230 wrote in message
news:[email protected]..
> In Labview 6i, I have set up multiple y-axes on an xy graph. I want to
> change certain properties of each of the 2 y-axes independently. I
> believe I can do this using "property node".
>
> However, after I have created a property node for the xy graph, I
> realised that there is only 1 y-axis selectable from the list of
> properties. How can I set the property of the other y-axis then?
>
> Thanks for the help! -
BPC Excel: Select hierarchy nodes & exclude an account within
Hello All
u2013 in EVDRE, is there a way to define a column selection for a account hierarchy node, however exclude one of the accounts within this group? THis is simmilar to BEX query, where you can select a hierarchy node and then also select to exclude a member within.
EG From the account hierarchy below, select the hierarchy node u2013 u2018group1u2019 , however exclude account 2.
Account Hierarchy
Hierarchy - group1
Account1
Account2
Account3
Account4
I have a couple of different column definitions, so this definition would need to be defined inside the column header area & not in the column member set.
Thanks
GlenHello Nilanjan
Firstly, thanks for your reply, much appreciated. One of the requirements is to have multiple column definitions in my report. To achieve this, i was planning to define the definitions inside the columns and adjust the colkeyrange to include all column definitions. This would mean that i would not use the column expansion and hence not have access to the suppress function.
Is there a way of including the suppress function in a column definition?
EG Include hierarchy node 'Parent - Group1" and exclude 'Account2'
Account Hierarchy
Parent - Group1
Account1
Account2
Account3
Account4
Thanks, Glen -
Unable to see hierarchy nodes for a hierarchy in Query designer
For IO 0GL_ACCOUNT, we have many hierarchies defined.
In the query designer when i am trying to restrict the 0GL_ACCOUNT with one of the hierarchy say Hier1 the corresponding hierarchy nodes should be displayed so that i can select any nodes of my choice and can restrict.
Strangley instead of showing hierarchy nodes,it is showing" [ ]" with out any values.Checked in RSA1 ,the hierarchy with all nodes visible perfectly.No authorization settings created on any of these hierarchies.
hierachy is in active state.
Appreciate any suggestions on this.
Regards,
Swapna.GBefore restricting you need to select hierarchy for the characterstic and tick the activate hierarchy display checkbox
-
Select one record for each member of the group
Hi,
am having a table where in i will be having data for so many group members. i need to fetch data for a particular group members whose number of rows of data may be more in numbers (but i want only one row of data for each member of the group)
here is the query for fetching all rows of data
select RI.RESOURCE_NAME,TR.MSISDN,TR.ADDRESS1_GOOGLE, TR.MSG_DATE_INFO, FROM TRACKING_REPORT TR, RESOURCE_INFO RI
WHERE TR.MSISDN IN (SELECT MSISDN FROM RESOURCE_INFO WHERE GROUP_ID ='1' AND COM_ID=2 ) AND RI.MSISDN=TR.MSISDN
order by MSG_DATE_INFOoutput of this query is...
>
ddd 12345 13-Mar-10 19:43:03
eee 54321 Tamil Nadu, India 13-Mar-10 19:39:48
ddd 12345 13-Mar-10 19:32:58
eee 54321 Tamil Nadu, India 13-Mar-10 19:30:07
ddd 12345 13-Mar-10 19:23:08
eee 54321 Tamil Nadu, India 13-Mar-10 19:20:14
fff 98765 13-Mar-10 19:19:22
ddd 12345 13-Mar-10 19:13:01
eee 54321 Tamil Nadu, India 13-Mar-10 19:09:50
ddd 12345 13-Mar-10 19:02:56
eee 54321 tn,ind 13-Mar-10 18:59:49
ddd 12345 13-Mar-10 18:53:08
eee 54321 tn,ind 13-Mar-10 18:49:50
ddd 12345 13-Mar-10 18:42:56
eee 54321 tn,ind 13-Mar-10 18:39:50
ddd 12345 13-Mar-10 18:33:00
eee 54321 tn,ind 13-Mar-10 18:29:50
ddd 12345 13-Mar-10 18:22:54
eee 54321 tn,ind 13-Mar-10 18:19:50
ddd 12345 13-Mar-10 18:12:56
eee 54321 tn,ind 13-Mar-10 18:09:50
ddd 12345 13-Mar-10 18:02:54
eee 54321 tn,ind 13-Mar-10 18:00:02
fff 98765 Tamil Nadu, India 13-Mar-10 17:59:26
fff 98765 Tamil Nadu, India 13-Mar-10 17:54:26
ddd 12345 13-Mar-10 17:52:56
eee 54321 tn,ind 13-Mar-10 17:49:50
fff 98765 Tamil Nadu, India 13-Mar-10 17:49:25
fff 98765 Tamil Nadu, India 13-Mar-10 17:44:26
ddd 12345 13-Mar-10 17:42:56
>
from this output i want only one latest record for each member(ddd,eee,fff). i.e
>
ddd 12345 13-Mar-10 19:43:03
eee 54321 Tamil Nadu, India 13-Mar-10 19:39:48
fff 98765 13-Mar-10 19:19:22
>
how to modify the query to achieve this...?Hi,
This is not giving the result which i want...
table is
CREATE TABLE TRACKING_REPORT
ID NUMBER,
MSISDN NUMBER(12) NOT NULL,
X NUMBER(15,8) NOT NULL,
Y NUMBER(15,8) NOT NULL,
TIME_STAMP DATE,
MSG_DATE_INFO DATE DEFAULT sysdate,
ADDRESS1_GOOGLE VARCHAR2(400 BYTE),
ADDRESS2_GOOGLE VARCHAR2(400 BYTE),
ADDRESS_MLINFO VARCHAR2(400 BYTE),
REQ_ID VARCHAR2(30 BYTE)
CREATE TABLE RESOURCE_INFO
RESOURCE_ID NUMBER,
MSISDN NUMBER,
RESOURCE_NAME VARCHAR2(25 BYTE),
ADDRESS VARCHAR2(100 BYTE),
COM_ID VARCHAR2(20 BYTE),
ADMIN_ID NUMBER,
TIME_STAMP DATE DEFAULT SYSDATE,
GROUP_ID NUMBER
) -
Insert new hierarchy nodes for key figures
Hi All,
In BI 7.0. when you right click on the key figure folder , you get an option called " insert new hierarchy node". Can anyone please explain what is this feature for. Is is just for reporting purpose where you can drill down for a particular key figure for more clarity. Thanks in advance.
Regards,
SatishHi,
This is for reporting purpose.
For example you have four key figures which consists the "TOTAL DEMAND".
Suppose TOTAL DEMAND = Purchase Requistion + Planned Order + Purchase Order + Production Order
We may provide hierarchy on TOTAL DEMAND, so that in display you may expand TOTAL DEMAND. When expanding TOTAL DEMAND it will show all four key figures with the total numbers in TOTAL DEMAND.
You may refer follwoing document as well.
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/c6e6ed94-0501-0010-2886-b6944515cfd9
I hope it will help.
Thanks,
S -
Select last occorence for each field of view where not there a timestamp
I have a view TEST with the following field Field1 , Field2, Field3, ....
Sample TEST
Field1 .................Field2
1 ...................... Rep7
2 ...................... Rep5
3 ...................... Rep4
1 ...................... Rep1
2 ...................... Rep3
3 ...................... Rep6
I want create a select that give the following result take a distinct field1 with the last occorence of field2
For each field1 I want take the last field2
sample of above the result is
Field1..................Field2
1 ...................... Rep1
2 ...................... Rep3
3 ...................... Rep6
Edited by: user9011634 on 19-gen-2010 16.55Well, as i told you before, UNLESS the view has an order by statement in it you're out of luck.
You will NOT get consistently ordered results UNLESS you have an order by statement.
So you can try the code posted for you before, and it may work 90+ percent of the time, but i don't know many places where 90% consistency is good enough.
*note, 90% is an arbitrary number, i can only tell you that it will not be 100% (and that's typically the required correctness rate any shop i've ever worked in). -
Select last value for each day from table
Hi!
I have a table that stores several measures for each day. I need two queries against this table and I am not quite sure how to write them.
The table stores these lines (sample data)
*DateCol1 Value Database*
27.09.2009 12:00:00 100 DB1
27.09.2009 20:00:00 150 DB1
27.09.2009 12:00:00 1000 DB2
27.09.2009 20:00:00 1100 DB2
28.09.2009 12:00:00 200 DB1
28.09.2009 20:00:00 220 DB1
28.09.2009 12:00:00 1500 DB2
28.09.2009 20:00:00 2000 DB2Explanation of data in the sample table:
We measure the size of the data files belonging to each database one or more times each day. The value column shows the size of the database files for each database at a given time (European format for date in DateCol1).
What I need:
Query 1:
The query should return the latest measurement for each day and database. Like this:
*DateCol1 Value Database*
27.09.2009 150 DB1
27.09.2009 1100 DB2
28.09.2009 220 DB1
28.09.2009 2000 DB2Query 2:
The query should return the average measurement for each day and database. Like this:
*DateCol1 Value Database*
27.09.2009 125 DB1
27.09.2009 1050 DB2
28.09.2009 210 DB1
28.09.2009 1750 DB2Could someone please help me to write these two queries?
Please let me know if you need further information.
Edited by: user7066552 on Sep 29, 2009 10:17 AM
Edited by: user7066552 on Sep 29, 2009 10:17 AMFor first query you can use analytic function and solve it.
with t
as
select to_date('27.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss') dt, 100 val, 'DB1' db from dual union all
select to_date('27.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'), 150, 'DB1' from dual union all
select to_date('27.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss'), 1000, 'DB2' from dual union all
select to_date('27.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'), 1100, 'DB2' from dual union all
select to_date('28.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss'), 200, 'DB1' from dual union all
select to_date('28.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'), 220, 'DB1' from dual union all
select to_date('28.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss'), 1500, 'DB2' from dual union all
select to_date('28.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'), 2000, 'DB2' from dual
select dt, val, db
from (
select row_number() over(partition by trunc(dt), db order by dt) rno,
count(*) over(partition by trunc(dt), db) cnt,
t.*
from t)
where rno = cntFor second you can just group by
with t
as
select to_date('27.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss') dt, 100 val, 'DB1' db from dual union all
select to_date('27.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'), 150, 'DB1' from dual union all
select to_date('27.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss'), 1000, 'DB2' from dual union all
select to_date('27.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'), 1100, 'DB2' from dual union all
select to_date('28.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss'), 200, 'DB1' from dual union all
select to_date('28.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'), 220, 'DB1' from dual union all
select to_date('28.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss'), 1500, 'DB2' from dual union all
select to_date('28.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'), 2000, 'DB2' from dual
select trunc(dt) dt, avg(val) val, db
from t
group by trunc(dt), db
order by trunc(dt) -
Selecting many records for each material...
Hi all,
I have an internal table that contains a list of materials. I want to loop over that list and retrieve a group of purchase reqs from EBAN for each material...appending each group of rews to my req table for each pass over the material list. Sample code;
LOOP AT GT_MATERIALS INTO WA_MATERIALS.
SELECT MENGE LFDAT
INTO CORRESPONDING FIELDS OF TABLE GT_EBAN_FIELDS
FROM EBAN
WHERE MATNR EQ WA_MATERIALS-MATNR.
???DO I DO AN APPEND OF SOME KIND HERE???
ENDLOOP.
Regards,
MatHi Mathew,
From performance point of view, the SELECT QUERY should not be under a loop. So you can do the following :
<b>SORT GT_MATERIALS.
IF not gt_materials is initial.</b>
SELECT MENGE LFDAT
INTO CORRESPONDING FIELDS OF TABLE GT_EBAN_FIELDS
FROM EBAN
<b>FOR ALL ENTRIES IN GT_MATERIALS</b>
WHERE MATNR EQ GT_MATERIALS-MATNR.
<b>ENDIF.</b>
Also if the structure of table GT_EBAN_FIELDS has only two fields MENGE, LFDAT then please remove INTO CORRESPONDING FIELDS, instead use INTO TABLE GT_EBAN_FIELDS. This is becz INTO CORRESPONDING FIELDS would affect the performance.
Best regards,
Prashant
Maybe you are looking for
-
I reposting this from another discussion to get it more focused as an OSAscript issu ad not only and CPU usage issue. Thanks to BGreg pointing out the right directions. Sometimes osascript starts on mye powerbook and makes the computer nearly useless
-
Dear team, We are persoanlizing iSupplier Portal . CM file extract tab Our requirement is to add 2 new search conditions to existing search Criteria. PO Need By Date and PO creation Date are the 2 new search conditons. datatype is date Already PO Nee
-
How can i create validation Checks in Online Adobe Form
Hi Gurus i am trying to create Online Adobe form.how can i do the validation checks while the user enter the values in Adobe form (For Ex: lets take personnel Number if the end user enter the personnel number it must go and check the Data base table
-
[SOLVED] No sound upon booting up today
I booted into Arch this morning and I noticed that none of my applications were giving off any sound despite the fact that the master control in alsamixer was unmuted and at 100%. My PC is running a dual-boot system of Arch and Windows 7. I'm running
-
Error with Orbicule Witness install
Tried to install Witness and got the following error report....not sure how to fix... Process: WitnessUserAgent [407] Path: /usr/local/witness/WitnessUserAgent.app/Contents/MacOS/WitnessUserAgent Identifier: WitnessUserAgent Version: ??? (???) Code T