Top 10 based on two conditions
Hello BW Experts,
Wondering if this is possible in Bex.
-- by default show the top 10 customer based on gross sales
-- then give a navigational option in the context menu to show the top 10 customers by net sales.
can this be achieved in bw using conditions.
Any suggetions is greatly appreciated.
Thanks,
BWer
Hi BWer,
It is possible to do this using conditions. Start creating a condition in the query and use the Top N condition. Create 2 of these: One for each key figure. Then in the report you can activate and deactivate them to see results are desired.
Hope this helps...
Similar Messages
-
Suppressing a section based on two conditions
Hello
currently, I am trying to suppress a section of group based on two conditions:
- The first condition is to suppress the section always if the user is not at DrillDownGroupLevel 1.
- The second condition is to supress the section if the GroupName ({Customer.TerritoryID}) is not UK or US.
I went to the section expert and entered this code in the "Suppress (No drill-down)" x-2 formula field:
DrillDownGroupLevel <> 1 AND
GroupName ({Customer.TerritoryID}) <> "US" OR
GroupName ({Customer.TerritoryID}) <> "UK"
Unfortunately, it does not work. Any ideas are very welcome!!
I am using Crystal Reports XI
Thanks in advance!!Which "section of a group" are you trying to conditionally suppress? (group header, group footer or details within a particular group......or all of them?)
AND you stated,
"currently, I am trying to suppress a section of group based on two conditions:
The first condition is to suppress the section always if the user is not at DrillDownGroupLevel 1.
The second condition is to supress the section if the GroupName ({Customer.TerritoryID}) is not UK or US.
Try this formula for the conditional suppression:
(DrillDownGroupLevel <> 1) AND
(GroupName ({Customer.TerritoryID}) "US") OR
(GroupName ({Customer.TerritoryID}) "UK")
If that does not work you may want to check and make sure your values are upper case in the TerritoryID.
In addition, a GOOD way to test conditional suppression formulas is to put them into a conditional highlighting color for the section so you can still see the values and the highlighting lets you know if it's working. For example:
IF
(DrillDownGroupLevel <> 1) AND
(GroupName ({Customer.TerritoryID}) "US") OR
(GroupName ({Customer.TerritoryID}) "UK")
then YELLOW else WHITE -
DBPolling based on two conditions
Hi All,
We have a requirement in our bpel to process to poll the DB based on two conditions as we know how to poll on DB for one conditions.
Any help is highly appreciated.
Thanks and Regards,
Nagaraju .DSorry it is late here, I was thinking of selecting data, forget what I have said.
Polling condition needs to be a sequence so there is no possibility of missing rows. Things like date, id etc
If you need to use multiple conditions you need to concatinate the fields as part of the select statement. You may need to create a view for this.
Obviously if you are doing a physical delete, or a logical delete there is no such issue as BPEL will read every row that is in the table, or where the flag is set to not processed.
Hopefully this helps, sorry for mucking you around
cheers
James -
Unable to filter a formula field based on two conditions
hi,
I have a report with 3 subreports in it. When i drill down onto first subreport i am getting correct records in details based on selection criteria but when i am unable to populate the same record count in summary.
For example
On summary i see : 60 when i drill down i see 20 records which is correct but not reflecting onto summary report
the details selection criteria is based on two fields where field1>=1 and field2= "Text"It is coming out good (20 records) but in summary i am unable to populate this based on same selection criteria
The main issue i am facing was if i apply a filter on summary selection criteria all the subreport counts are getting affected. Is there a way i can apply filters only one one field
Please suggest
Thanks!
LuckyThanks! for the prompt response Abhilash
I got part of what you told me. Yes i am calculating the counts in the summary report.
Basically here is the selection criteria: i need to filter the records based on two conditions. One is x.field1= "Admin" and x.field2=act_pct>=1
For example:
Admin Returns 50 but when i dig into details it showing as 20 records ( based on selection criteira above)
when coming back to summary . 50 what ever is returing here is based on a formula ( if x.field1="admin" then 1 else 0) ..in addition to this i need to filter that by x.field2>=1 which is not taking it
Is there any syntax to do this
If i apply a filter on this particular 50 record its bee applying for whole summary report ...
And from what you said :
Why don't you create the summary in the Subreport and maybe use shared variables to bring it back to the Main Report?
i did not get this
Please suggest
Lucky -
Start Local chain based on two conditions
Hello,
I want to trigger a local chain in a metachain based on success of two conditions.
1) at a stipulated time.
2) and on the completion of above process.
Also is there a function module by which i can get the variant name of a process.how can this be achieved.
Thanks
Dutta -
WriteBack: Update a field based on two conditions.
Hi Experts,
I am facing a serious problem in write back to database.
Let me explain the writeback i am trying to do.
I have a table as Below
Col1----- Col2---------Col3----------Col4
100--------1-------------2----------100/(1+2)
Col1,col2,col3 are editable.
Once the values are entered in these columns Col4 is calculated by the formula (Col1/(Col2+Co3))
If the user enters 0 in col2 and col3 then it will be a division by zero which i have handled by the DECODE function
But the user requires a standard value to be shown there that is Col1/0.57895 whenever he enters 0 in col2 and col3.
I initiially put a column formula for Col4 in answers saying if col2 or col3 = 0 then (Col1/0.57895)
But as this formula is only at the prsentation level...teh values were not getting saved in the database.
My requirement is i need to put this condition in the writeback xml itself and see to it that this standard value be updated in the table itself.
like
update table set col4=Col1/0.57895 where col2=0 and col3=0
Update table set col4=(Col1/(Col2+Co3)) where col2 <>0 or col3<>0
I am unable to use two update queries in teh xml template.
Please let me know how can i implement this in the xml template.
Appreciate your immediate response.
-Best Regards!You can't do it in the xml but you can do it in the database with a before trigger update
http://www.techonthenet.com/oracle/triggers/before_update.php -
Top n filter in universe based on two measures(MDX expression)
Hi,
I have to do filter at universe level based on two measures. for example, i have
BusAr year value
ddddfd 1997 435433.
I can able to do filter using mdx expression for busniess area wise top 10 values in universe. using the following syntax
<FILTER EXPRESSION="Rank([0BUS_AREA].CurrentMember, Order([0BUS_AREA].CurrentMember.Level.Members, [Measures].[D7G51I90GYJ8POGFSYVFPX24F], BDESC))">
now i want to filter using year wise and business area wise top 10 filter in universe. where to add the second member yearwise in Rank () function.
how to achieve this.
Regards,
Shanthakumar.Hi,
I am not sure you want to make a Top n filter on 2 different measures.
But if you want to make a Top n filter on 2 ore more different dimensions, here is the code.
IIf(IsEmpty([Measures].[Sales Amount]),null,
Rank( StrToTuple( "(" + Generate(Head(Axis(1),Axis(1).Item(0).Count) AS RN,
"Axis(1).Item(0).Item(" +
CStr(RN.CurrentOrdinal - 1) +
").Hierarchy.CurrentMember",
",") + ")" ),
Axis(1), [Measures].[Sales Amount] ) )
Please note that the code is taking into account all dimensions involved in the rows axis, so the more dimensions yu add in the query the top n will increase the number of values.
I have successfully tested it on MSAS but it seems that on SAP the "+" character is not allowed...
Maybe there are some SAP notes to add.
Didier -
Calling two table controlls based on some conditions......
I hav a requirement in which i have two table controlls, which i want to call based on some conditions. Like if condition is satisfied the first table controll shud fill up the screen and other wise the secondtable controll shud fill the screen....
Hello,
In the main screen where u need to vary with the 2 table controls , create a subscreen area .
Now create two subscreens with the required table controls respectively.
You can dynamically call the subscreens accordingly for the conditions.
Hope this may help you.
Neeraj -
Hello,
I have a reports with few key figures, for one of regular key figure and formula key figure need to create two conditions. 1st condition needs to bring values greater than X values (example 20) from regular key figure. 2nd condition should bring top 10 values from formula key figure. 2nd condition should only show top 10 from list of 1st condition. Can this scenario achievable in 3.x query designer? Any help greatly appreciated!
Regards,
JayPeeHi, You can have multiple Conditions in a Query wherein each Condition is evaluated independently, however the order matters. Hence, have;
- first condition on the KF where > some fixed value
- second condition on the same KF where the Top N operator is used where N is obtained from a Formula Var using Manual I/P
for more on Conditions, refer below links
http://help.sap.com/saphelp_nw04/helpdata/en/1e/7875a998bc44409f6002e28552685a/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/86/dfc405ab60524ea0d3e89db15fb2e7/content.htm
--Priya -
Select One Choice attribute' LoV based on two bind variables, best practice
Hello there,
I am in the process of learning the ADF 11g, I have following requirement,
A page must contain a list of school names which is needed to be fetched based on two parameters, the parameters are student information been inserted in the previous page.
I have defined a read only view "SchoolNamesViewRO", it's query depends on two bind variables :stdDegree and stdCateg.
added that RO View as a view accessor to the entity to which the name attribute belongs, and then add LoV for the name attribute using the ReadOnly view,
added the name attribute as Select One Choice to page2,
and now I need to pass the values of the bind variables of the ReadOnly view,
the information needed to be passed as the bind variables is inserted in the previous page, I could have the data as bindings attribute values in the page2 definition
I have implemented the next two appraoches but both resulted in an empty list :
* added ExecuteWithParams Action to the bindings of the page and then defined an Invoke Action (set refresh condition) in the executable s, set the default values of the parameters to be the attributes values' input value,
in the trace I code see that the binding fetches correct values as supposed , but the select list appears empty, does the this execution for the query considered to be connected to the list ?
* added a method to the ReadOnly view Imp java class to set the bind variables, then I define it as a MethodAction in the bindings , and then create an Invoke action for it , also the select is empty,
if the query been executed with the passed variables, then why the list is empty? is it reading data from another place than the page!
and what is the best practice to implement that requirement?
would the solution be : by setting the default value of the bind variables to be some kind of Expression!
please notice that query execution had the bound variables ( I see in the trace) are set to the correct values.
would you give some hints or redirect me to a useful link,
Thanks in advance
Regards,please give me any example using backing bean .for example
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<f:view>
<af:document id="d1">
<af:form id="f1">
<af:selectOneChoice label="Label 1" id="soc1" binding="#{Af.l1}"
autoSubmit="true">
<af:selectItem label="A" value="1" id="si1"/>
<af:selectItem label="B" value="2" id="si2"/>
</af:selectOneChoice>
<af:selectOneChoice label="Label 2" id="soc2" disabled="#{Af.l1=='2'}"
partialTriggers="soc1">
<af:selectItem label="C" value="3" id="si3"/>
<af:selectItem label="D" value="4" id="si4"/>
</af:selectOneChoice>
</af:form>
</af:document>
</f:view>
</jsp:root>
package a;
import oracle.adf.view.rich.component.rich.input.RichSelectOneChoice;
public class A {
private RichSelectOneChoice l1;
public A() {
public void setL1(RichSelectOneChoice l1) {
this.l1 = l1;
public RichSelectOneChoice getL1() {
return l1;
is there any mistake -
Select Query Based on date condition
Hi ,
Is it Possible.
i want to run select query based on date condition.
Eg...
if the date between 01-jan-01 and 01-jan-05 then
select * from table1;
if the date between 02-jan-05 and 01-jan-08 then
select * from table2;
Becaz i have data in 2 diffrent tables , based on the date condition i wnt to run the select statement to diffrent tables.
i dont want plsql here Just SQL needed.
thanks,
-R
Edited by: infant_raj on May 5, 2009 11:48 PMHelo Kanish,
this is not the one i was asking..
wht i mean was .
i use bind variable to get date while running the select statement , once i get the date then i want to choose any one of the table to run select query.
EG..
select col1,col2 from table1 where date between only if 01-jan-01 and 01-jan-05;
select col1,col2 from table2 where date between only if 02-jan-05 and 01-jan-08;
Run any one of the two . not all
thanks,
_raj -
Inserting new columns based on the condition!
Hi guys,
I have a very simple query like the following…
SELECT table2.column_code2,
table2.column_description2,
table2.column_code1,
table1.column_description1
FROM database_001.table2 table1 LFET OUTER JOIN database_001.table2 table1 on (table2.column_code1 = table1.column_code1)
From this query, its returning me a result set of something like below:
column_code1 column_description1 column_code2 column_description2
RO1 BOOK RL1
PDF/ECOPY
RO2 PAPER RL2
CONFERENCE
RO5 JOURNAL
RL11 OTHER
Now, on the above query I want to insert three extra columns with the name (status, location and contact) where the results in the extra three columns would be based on the conditions I want to define in the query based on the above results…
Something for example (sorry, I am not trying to write a condition: my question is how to write it),
if column_code1 = RO1 and column_description2 = PDF/ECOPY on status column it should return a value ‘ONLINE’ & on location column it should return ‘WEB’ and on contact column it should write ‘BOB’.
Also,
if column_code1 = RO5 and column_description1 = JOURNAL on status column it should return a value ‘ON PRESS FOR PRINT’ & on location column it should return ‘S.R STREET, LONDON’ and on contact column it should write
‘SMITH’ like below result…so the final output should be the top four columns and the extra three columns…I hope someone can help me into this…thanks a lot…
status location
contact
ONLINE WEB
BOB
ON PRESS FOR PRINT S.R STREET, LONDON SMITHHi artistdigital,
you can use case statment for same in sql server. MSDN link - > http://technet.microsoft.com/en-us/library/ms181765.aspx
Try code like this:
SELECT table2.column_code2,
table2.column_description2,
table2.column_code1,
table1.column_description1,
case when column_code1 = 'RO1' and column_description2 = 'PDF/ECOPY' then 'ONLINE'
when column_code1 = 'RO5' and column_description1 = 'PDF/ECOPY' then 'ON PRESS FOR PRINT'
end as [status],
case when column_code1 = 'RO1' and column_description2 = 'PDF/ECOPY' then 'WEB'
when column_code1 = 'RO5' and column_description1 = 'PDF/ECOPY' then 'S.R STREET, LONDON'
end as [Location],
case when column_code1 = 'RO1' and column_description2 = 'PDF/ECOPY' then 'BOB'
when column_code1 = 'RO5' and column_description1 = 'PDF/ECOPY' then 'SMITH'
end as [contact]
FROM table2
join table1
on table2.column_code1 = table1.column_code1
Regards Harsh -
Printing Flag Based on the Condition Request
Hello
I have a requirement where i need to check two conditions on Date and Print the Date in Red and Flag(Symbol) adjacent to the Date, I used Conditional Format and gave my Conditions and then i am ableto print the date in Red , Below is my Conditional Format XML and i am unable to print a symbol adjacent to the Date with the same Condition
Here is my Conditional Format XML
<?if:LE_DT<PRINT_DATE?><?attribute@incontext:color;'red'?><?end if?><?if:ACT_DT='--'?><?attribute@incontext:color;'red'?><?end if?>
i need to print a FLAG symbol also based on this condition
Thanks for your helpSo after the attribute setting you need to put in the flag character. To do this, you will need to put the opening and closing if statements in separate form fields and then put the flag character between them.
<?if:LE_DT<PRINT_DATE?><?attribute@incontext:color;'red'?>FLAG CHAR<?end if?><?if:ACT_DT='--'?><?attribute@incontext:color;'red'?>FLAG CHAR<?end if?>
Bear in mind that the flag character may come from a special font e.g. wingdings. In which case you will need to ensure that font is on the server - check the docs. Or you can conditionally show an embedded image in the same way.
Regards
Tim -
Question - View with a join based on two unequal strings.
Hello -
First my apologies for the likely novice question.
I'm creating a view based on two tables as such:
SELECT *
FROM table1 LEFT OUTER JOIN table2 ON table1.string = table2.string AND table1.number = table2.number
Problem: table1.string looks like "A00A01%%%" and table2.string looks like "A1" (which would correspond to "A00A01%%%".
Question: Can I create the join based on the 4th and 6th character of the string = the other string, or should I create a view with a formula creating a new field and then create a second view? (Note: creating or changing the field in the original table is not an option).
Thank you.Hi,
Yes, you can do that. Join conditions don't have to be as simple as "ON a.col1 = b.col2"; they can involve functions, like CONCAT and SUBSTR.
For example:
FROM table1
LEFT OUTER JOIN table2
ON SUBSTR (table1.string, 4, 1)
||
SUBSTR (table1.string, 6, 1) = table2.string
...The query might be faster if you create a function-based index on the join condition from table1. This does not require changing table1 itself. (For a LEFT OUTER JOIN, like this, it probably won't matter.) -
Oracle Business Intelligence How to choose data set based on a condition
Hi,
I am using Oracle Business Intelligence for creating reports, i am facing a situation where i have two quries (data sets in BI), one to display a Failure message and other to fetch data from the table to be displayed in the report.
The problem is i am unable to choose which data set to run based on a condition. How to use a condition based on which the dataset will be run
For example : i will read a table column value if it is 'S' means success, then i have to run the dataset to fetch the data from the table.
If the column value has 'F' then i have to run the dataset which will display failure message
Please let me know if any of you have any idea on this
Thanks in advance
MuthukumaranHi Chinna,
You have to use some scripting as well as coding to perform the tasks listed by you. First of all make your form Dynamic, In your Adobe lifecycle Designer, open your form,
Goto, File --> Form Properties,
Goto the Defaults tab,
Select "Dynamic PDF" for the XDP Preview Format:
Click OK.
This setting will now allow dynamicity in your Form, when you view it in PDF Preview tab.
For Hiding/Unhiding the fields/SF, you can use the presence property and set it based on the conditions. like:
if (this.rawValue == null)
TextField1.presence = "hidden";
For your second task, you may map a method corresponding to onSubmit event of the IF and write the code to create the workflow and make RFC call here.
For third one, you need to convert the PDFObject from Binary context into a byte array and save it at appropriate location.
Hope I have answered all your queries.
Cheers,
Arafat
Maybe you are looking for
-
I have done something really stupid. Whilst attempting to extend the partition for my boot camp with winclone, I inadvertently wiped my external hard drive by creating a partition the whole size of the external hard drive instead of 40g which would h
-
Problem in Adding in Document Object Table.
I want to Add/Update the data in the Documentobject table and DocumentLineobject table through my own SRF. Please guide me how should i proceed.
-
PI 7.1: WS RM Adapter to IDOC SAP Integration
Hi All, I had a few questions on WSRM-IDOC integration in PI 7.1. This is mainly related to understanding of WS-RM Adapter integration. Please provide your thoughts and inputs to the following questions: (a) I am under the impression that WS -RM adap
-
Cannot view photos in iPhoto 09
I have iLife 09 and am new to the Mac world. I am wondering why iPhoto will not allow me to see pictures I was once able to. I used some of my photos in iMovie and iDVD, and they worked just fine. I went back in to view the pictures and edit them for
-
When using the Pages > Insert Blank Page command, is it possible to specify the page dimensions of the new page?