Different columns having different condition in BI Answers
i want to have an report as like in the format :
Name of the sectors In local currency In foreign currency
"<= 12 months" ">12 months" "<= 12 months" ">12 months"
0-250,000 >250,000 150,000- 350,000 >350,000
Public Sector
-Economic Public Corporations
-Public Business Sector Companies
i want to have the report in the above format ..
where under the local currency contains there will be two colums of the range. i have got one column with <=12 months but how to get another column with less than >12 months with the condition >250000 and all in individual rows..
Can any body please suggest..
Hi.
Navigation drills from one to another report using column propetries navigation only works in case that you are using the same column from the same table, and this column is IS PROMPTED in both reports.
Example 1:
Fact1 >- Dim1.COL1 (Report 1)
Fact2 >- Dim2.COL1 (Report 2)
Navigation from Report1 to Report2 is not working although Dim2.COL1 is promted and you are drilling from Dim1.COL1.
Example 2:
Fact1 >- Dim1.COL1 (Report 1)
Fact2 >- Dim1.COL1 (Report 2)
Navigation from Report1 to Report2 is working because both reports share the same table.column (Dim1.COL1) and it is prompted in the second report.
You can use GO URL navigation for reports and dashboard pages for other cases.
Regards,
Goran
http://108obiee.blogspot.com
Similar Messages
-
Different conditions for different columns
Hi,
I have two tables and both have 3 common columns. I have to write a query joining the two tables and get different columns with different conditions.
For e.g., I have the tables test and test1.
create table test (a1 varchar(10), a2 varchar(10), a3 varchar(10), a4 date, a5 number, a6 number, a7 number, a8 number);
create table test1 (a1 varchar(10), a2 varchar(10), a3 varchar(10));
insert into test1 values('abc', 'a', 'z');
insert into test1 values('xyz', 'b', 'y');
insert into test values('abc', 'a', 'x', trunc(sysdate,'MM'), 100, 200, 300, 400);
insert into test values('abc', 'b', 'z', trunc(sysdate,'MM'), 567, 4778, 4234, 6767);
insert into test values('xyz', 'a', 'y', trunc(sysdate,'MM'), 5467, 2134, 5678, 8332);
insert into test values('xyz', 'b', 'z', trunc(sysdate,'MM'), 3534, 744, 678547, 46);
insert into test values('abc', 'a', 'x', trunc(add_months(sysdate,-1),'MM'), 700, 800, 900, 600);
insert into test values('abc', 'b', 'z', trunc(add_months(sysdate,-1),'MM'), 565477, 474578, 4456234, 226767);
insert into test values('xyz', 'a', 'y', trunc(add_months(sysdate,-1),'MM'), 235467, 2342134, 255678, 258332);
insert into test values('xyz', 'b', 'z', trunc(add_months(sysdate,-1),'MM'), 324534, 25744, 678547, 78846);
select * from test1;
A1 A2 A3
abc a z
xyz b y
select * from test;
A1 A2 A3 A4 A5 A6 A7 A8
abc a x 05/01/2010 00:00:00 100 200 300 400
abc b z 05/01/2010 00:00:00 567 4,778 4,234 6,767
xyz a y 05/01/2010 00:00:00 5,467 2,134 5,678 8,332
xyz b z 05/01/2010 00:00:00 3,534 744 678,547 46
abc a x 04/01/2010 00:00:00 700 800 900 600
abc b z 04/01/2010 00:00:00 565,477 474,578 4,456,234 226,767
xyz a y 04/01/2010 00:00:00 235,467 2,342,134 255,678 258,332
xyz b z 04/01/2010 00:00:00 324,534 25,744 678,547 78,846I have to write a query to get values for columns a1, a4, a5, a6, a7 and a8. For each distinct month fro mthe column a4, the values for columns a1, a4 a5 and a6 should be based on the condition test1.a1=test.a1 and test1.a2=test.a2. The condition for columns a7 and a8 should be test1.a1=test.a1 and test1.a3=test.a3.
How can I do this?
Thanks,
Machaanremove the 4th join and only duplicate test;
SQL> ed
Wrote file afiedt.buf
1 select distinct
2 case
3 when t11a1 is null then
4 t12a1
5 else
6 t11a1
7 end as a1
8 ,case
9 when t11a4 is null then
10 t12a4
11 else
12 t11a4
13 end as a4
14 ,case
15 when t11a5 is null then
16 t12a5
17 else
18 t11a5
19 end as a5
20 from (
21 select t11.a1 as t11a1
22 ,t11.a2 as t11a2
23 ,t11.a3 as t11a3
24 ,t11.a4 as t11a4
25 ,t11.a5 as t11a5
26 ,t11.a6 as t11a6
27 ,t11.a7 as t11a7
28 ,t11.a8 as t11a8
29 ,t12.a1 as t12a1
30 ,t12.a2 as t12a2
31 ,t12.a3 as t12a3
32 ,t12.a4 as t12a4
33 ,t12.a5 as t12a5
34 ,t12.a6 as t12a6
35 ,t12.a7 as t12a7
36 ,t12.a8 as t12a8
37 from test1 t1
38 ,test t11
39 ,test t12
40 where t1.a1 = t11.a1
41 and t1.a2 = t11.a2
42 and t1.a3 = t12.a3
43* )
SQL>
SQL> /
A1 A4 A5
xyz 01-APR-10 324534
xyz 01-MAY-10 3534
abc 01-APR-10 700
abc 01-MAY-10 100 -
Update one column in different conditions
Is there any way by which I can merge following two update statements into a single statement without using plsql. Here the same column of one table is being updated in different conditions.
UPDATE week_table
SET present_week=NULL
WHERE week_table.pay_statusk=(
SELECT value
FROM panel
WHERE pname='PRESENT_WEEK')
UPDATE week_table
SET present_week='Y'
WHERE week_table.pay_status=(
SELECT value+1
FROM panel
WHERE pname='PRESENT_WEEK')
--waiting for a solution, thanks in advance.
nullOr like...
SQL> select * from week_table;
PRESENT_WE PAY_STATUS
X 1
X 2
SQL> select * from panel;
PNAME VALUE
PRESENT_WEEK 1
SQL> UPDATE week_table
2 set present_week = decode(pay_status,(select value
3 from panel
4 where pname = 'PRESENT_WEEK'),null,
5 (select value+1
6 from panel
7 where pname = 'PRESENT_WEEK'),'Y')
8 WHERE week_table.pay_status=(
9 SELECT value+1
10 FROM panel
11 WHERE pname='PRESENT_WEEK')
12 or
13 week_table.pay_status=(
14 SELECT value
15 FROM panel
16 WHERE pname='PRESENT_WEEK');
2 rows updated.
SQL> select * from week_table;
PRESENT_WE PAY_STATUS
1
Y 2 -
Group by same column with different conditions
Hi All,
I have the following SQL statement
select Sum(Total), Region, Code from table_A group by Region, Code
Code has distinct values of 1 to 10 for each Region.
Is it possible to group by Region, Code < 5 and Code > 5.Here is a solution which I have but wanted to see if there is any other way to do it.
select Sum(Total), Region,'code<5' as Code from table_A group by Region, Code having code < 5
union
select Sum(Total), Region,'code>5' as Code from table_A group by Region, Code having code > 5 -
Different execution plan for same query but for different condition value
Hi All,
I'm facing a strange situation where same query for different condition not working.
1--
Select top 10 * from revenuefact(nolock)
where feecode ='OW4'
2--
Select top 10 * from revenuefact(nolock)
where feecode ='BTE'
1st query is returning result easily but 2nd query is taking too long. Column
feecode has already Non-clustered index and Clustered index is also available for another col RevenueSID.
I was surprised when checked the query execution plan for both the above queries which is quite different (as per attached below). Can anyone suggest me the reason behind it.
And solution for the same. One more thing that data for feecode BTE is inserting through different source instead of others feecode and table contains more than 300 million rows.When I speak with people inside Microsoft who work with the optimizer, the refuse to accept the work "bug" when a query produces the correct result, but with a suboptimal plan. They prefer to use the word "limitation".
The limitation here is that when the optimizer compares two plans, it only looks at the estimated cost. As far as I know, it does not perform any analysis from the perspective "what if the statistics are wrong"? They do provide the hint OPTIMIZE
FOR UNKNOWN, but that does not work then there is a constant as in this case.
The optimizer will surely distinguish between TOP 10 and TOP 10000000. With the latter, you have all reason to expect a Clustered Index Scan no matter which value you search for - unless you pick a value for which the histogram indicates that there are no
rows.
Interesting enough, I was able to reproduce the situation in my Northgale database, which is an inflated version of Northwind, and where statistics should be accurate.
SELECT TOP 10 * FROM Orders WHERE EmployeeID = 8
results in a CI scan, and so does also EmployeeID = 7, and even 5. There are only 2292 rows out of a total of 344305 rows. If I try EmployeeID 808 for which there are 1797, the optimizer goes for the index seek.
Erland Sommarskog, SQL Server MVP, [email protected] -
Two different condition types in one report
Hello,
i have a problem with the conditional display of a report.
I want to use two different condition types for one report.
For example I want to show the report only when the page is not in printer friendly mode and when the value of an item is NULL.
Is that possible?
Has anyone a solution for this problem?
Thank you,
TimTim,
you can use
IF V('PRINTER_FRIENDLY') = 'YES' AND :P1_ITEM IS NOT NULL THEN RETURN FALSE;
ELSE RETURN TRUE;
END IF;
in the Conditional Display picking PL/SQL Function Body returning a Boolean.
Denes Kubicek -
How to handle same material number but different condition?
In our industry(aerospace aftermarket), we can have inventory for one material in different conditions, e.g new, overhauled, scrap, etc. We use batch management and store the condition at the batch level. This probably was not the best way to handle this and now we're wondering how we can run MRP for a specific material, but only for certain conditions.
From what I understand MRP only occurs at the material level, not the material-condition level. Is my assumption correct? Obviously, we would not want to include scrap inventory in any MRP or forecasting calculations. So if we had 10 for material 1234 in inventory, we'd want to exclude the amount that's scrap or any other condition we don't want to include in a forecast/MRP.
Is there a best practice that someone can share to handle this type of inventory management issue? Thanks!Hi,
I've never used this but please have a look at it:
http://help.sap.com/erp2005_ehp_04/helpdata/EN/c6/126422bd9c11d1b54f0000e82de178/frameset.htm
Planning startegies for variants:
This section describes how to plan products that have a practical limited number of possible combinations of characteristics and characteristic values. Technically speaking this section describes the use of variants to sell configurable materials.
Regards,
Csaba
Edited by: Csaba Szommer on Feb 5, 2009 10:46 PM -
Query on Creating and Populating I$ table on different condition
Hi,
I have a query on creating and populating I$ table on different condition.In which condition the I$ table is created??And These condition are mentioned below:
1)*source and staging area* are on same server(i.e target is on another server)
2)*staging area and Target* are on same server(i.e source is on another server)
3)*source,staging area and Target* are on *3 different* server
4)source,staging area and Target are on same server
ThanksI am not very much clear about your question. Still trying my best to clear it out.
In your all above requirement I$ table will be created.
If staging same as target ( One database,one user) then all temp tables will be created under this user
If staging is different than target ( One database,two user (A,B)) then all temp tables will be created under this user A (lets consider) and data will be inserted to the target table that is present in user B
If staging is different than target ( Two database,two user (A1,A2), not recommended architecture) then all temp tables will be created under this user A1 (database A1) and data will be inserted to the target table that is present in user A2 (database A2)
If source,staging,target will under one database then No LKM is required,IKM is sufficient to load the data into target. Specifically for this you can see one example given by Craig.
http://s3.amazonaws.com/Ora/ODI-Simple_SELECT_and_INSERT-interface.swf
Thanks. -
How can i get different Condition Type for third-party Purchase Order?
Hi, experts,
for standard PO my Schema works well. now I want to get a different condition type for third-party purchase order. I try to extend field catalog (Pricing Purchasing). The Field PSTYP exists already. However, it is not provided in the field catalog.
How could i do?
Thanks
ReneHi Rene,
If you are seeing fields in the field catalog but are not seeing this field when creating the condition table then the field probably does not exist in the KOMG structure for allowed fields for condition structures. KOMG represents the total of KOMK and KOMP which are the pricing communication structures. If your field is not there then you need to append it to item data in INCLUDE KOMPAZ in KOMP since this is an item level field. If it were a header level field you would append it to include KOMKAZ in KOMK. The inclusion of new fields in KOMK or KOMP automatically means that they are also included in KOMG.
After doing this you will see the field when creating a table. There is further documentation on this process in the IMG under SPRO-> Materials Management-> Purchasing-> Conditions-> Define Price determination Process -> System Enhancements - View the documentation associated to this node in the IMG
Hope this helps,
Matt -
Hello all,
I want to create or update multidimensional freight conditions for different scale id for different conditions.
I cound not find any Bapi or FM for this. I uesd BDC for this but i can not rely on it.
If any one have other solution than IDOC then suggest me.
Any BAPI or FM available then suggest me.Hi Gowri Rao,
Can you please tell me, what values do you pass in table 'IT_PRICING_CONDITIONS'?
Regards,
Pratik -
Are different conditions for deleting applets possible?
Is it possible to set different conditions for applet deleting?
So someone can delete, for example, applet_A and applet_B but can not delete applet_D. While applet_D can not be deleted at all or can be deleted by someone else who can fulfil conditions for applet_D deletion.
What is way to do so?
PS and offtopic: why "applet N", where N - character between 'B' and 'D', is so magic so i can not post message with this phrase? The forum engine writes something like - "this content is not allowed", heh.
Edited by: 666 on Feb 27, 2011 9:32 AM666 wrote:
Is it possible to set different conditions for applet deleting?
So someone can delete, for example, applet_A and applet_B but can not delete applet_D. While applet_D can not be deleted at all or can be deleted by someone else who can fulfil conditions for applet_D deletion.
What is way to do so?
PS and offtopic: why "applet N", where N - character between 'B' and 'D', is so magic so i can not post message with this phrase? The forum engine writes something like - "this content is not allowed", heh.Do you mean
| appletC | ( applet &#67; ) |
| applet_C | ( applet_&#67; ) | -
Display Columns having sum/total not zero
We have a report that hav total twenty columns.
Each time we run te report (dynamic query) random columns have sum=zero
we want to display eachtime only the columns having sum greater than zero.
regards
jazibHi Jazib,
Ok - I've been testing this here [http://htmldb.oracle.com/pls/otn/f?p=267:43]. The report on the left shows/hides the SAL and COMM columns according to the totals. The report on the right shows the full data. Change the Dept to see this in effect.
There are other methods available, but this is what I have done:
The dept select list (item name is P43_DEPTNO) is just a list of departments and a NULL option that returns 0 (zero).
The report's source is a SQL statement of:
SELECT EMPNO, ENAME, SAL, COMM
FROM EMP
WHERE :P43_DEPTNO = 0 OR :P43_DEPTNO = DEPTNO
ORDER BY ENAMEI have a region in the After Header position that uses "No Template" and contains two Hidden items - P43_SAL and P43_COMM.
I have an Item Computation, running "Before Header", that sets P43_DEPTNO to 0 if it is NULL.
I have an unconditional PL/SQL Process, running "On Load - Before Header", that has the following process code:
DECLARE
vSAL NUMBER;
vCOMM NUMBER;
BEGIN
SELECT NVL(SUM(SAL),0), NVL(SUM(COMM),0)
INTO vSAL, vCOMM
FROM EMP
WHERE :P43_DEPTNO = 0 OR :P43_DEPTNO = DEPTNO;
:P43_SAL := vSAL;
:P43_COMM := vCOMM;
END;And, finally, on the SAL column in the report, I have set the Condition Type to "Value of Item in Expression 1 != Zero" and Expression 1 is: P43_SAL. And the same on the COMM column, but Expression 1 is: P43_COMM
When the page is loaded, the process is run and the totals for SAL and COMM are calculated and inserted into P43_SAL and P43_COMM. The report is then run and the conditions check the values of these two hidden items - if either is non-zero, then the column is displayed.
Andy -
How to create Tree format in Table Rn in one Column having data?
Hi Gurus,
i got the new requirement it's very interesting pl z help me...
My Requirement is i have one Table Rn in Table Rn having 5 columns There here one column name is 'Competencies ' That Competencies column having the more rows liki
FUNC.ADMIN.Achievement Orientation
FUNC.ADMIN.Administrative Assistance and Support
FUNC.ADMIN.Administrative(ADMIN)
This is one column data my Requirement is now
FUNC
+ADMIN
+Achievement Orientation
like clients are expecting pl z tell me how to approach in this requirement and what are prerequisites are needed ...plz help me it's urgent requirement.
Regards,
SriniHi Gyan,
Thank's for valuable suggestions
My Requirement is This ...
"Competencies" Table Layout: (InstTableLayout)
COMPETENCIES (COLUMN NAME)
BEHV.Generic.Communication(BEHV)
BEHV.Generic.Planning, Organizing & Time Management
BEHV.Generic.Problem Solving Ability
BEHV.Generic.Productivity
BEHV.Generic.Punctuality
like number of rows are there now Tree format is row data
like each column divided each one
ex:
+ BEHV
*|*
+Generic
*|*
+Communication(BEHV)
like he expected client in tree format pl z tell me how to approach in this requirement and what are the prerequisites are required .....
Regards,
Srini
Edited by: 876628 on Dec 1, 2011 8:37 PM
Edited by: 876628 on Dec 1, 2011 8:37 PM -
Hide column based on condition on other column in table
hi,
am using BIP 10.1.3.2 to generate reports.In the template i need to hide one column based on condition on other.am using SQL query as my data source type.can anybody help me ?Use <?if:?> condition in the RTF, but its mainly for the rows not column. You can work around this by handeling in backend. Or take two separate tables, one with the column which you want to hide and another table without that column and before calling that table use IF condition.
Regards,
Amit D
Persistent Systems Ltd. -
List all columns having only nulls from all tables in a database.
I want to select columns from all tables having only null values. Each table has 60+ columns and i have 100+ tables in database. Requesting a script to list all tables at a time and their columns having all nulls? Below is my expected output. Thank
you in advance !
Table name
Null valued Column
Address
Address Line 2
Address
Address Line 3
Address
Zip Code
Product
Product Desc
Product
Product SKUHello,
In addition to Naomi's reply, you can refer to the following links about loop through all the tables in the database:
http://www.codeproject.com/Tips/161663/Loop-through-all-tables-in-SQL-Server
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/07b9799e-aeab-442e-99a0-ba76ab051f59/looping-through-databases-and-count-the-number-of-items-in-a-specific-table?forum=transactsql
Regards,
Fanny Liu
Fanny Liu
TechNet Community Support
Maybe you are looking for
-
Itunes won't start up on my ipad 2. I get a spinning wheel.
I bought an iPad 2 to use in my classroom. Our IT guy set it up to work with our filters so I can connect the internet, but I can't get iTunes to open. I just get the spinning gear of death! Any help would be appreciated. I have synced it to my c
-
Lost all signal after updating to IOS 7.1
I have an iphone 4s and Tesco sim. No previous problems at all and had kept the phone updated, until about 5 days ago when I updated to IOS 7.1, since when I have lost all my network coverage. It constantly shows 'Searching' or sometimes 'No Service'
-
AP: MR90 with Debit Memo process
I'd like to understand the use of MR90 in conjunction with the debit memo process. Also, I would like the ability to fax these notifications rather than have them printed. Is this possible? If so, how do we do it? Thanks!
-
Wireless install of HP C4780 on Mac running OS 10.9.2
I have a C4780 that I can't get the wireless connection working. Via USB, its OK, but want the wireless to work as well. I've already taken the following steps: 1) Update HP software via Apple Sortware update (i have version 2.16.1) 2) I've run a n
-
Can't turn off "Find my iPad" in the settings of iCloud.
Help please. I can't turn off "Find my iPad" in the settings of iCloud. Error message appears : "there was a problem cancellation of registration of the iPad in iCloud. Try to turn off the "Find my iPad again" Apple ID and password to remember, and i