BEx query design: defining complex filters?

Is it possible to define complex filters in a query definition? By complex I mean using logical operators (AND, OR, NOT)
Example: report giving sales results
I want to have
(Customers from Germany <b> AND </b> product type A)
<b> OR </b>
(Customers from Romania <b> AND </b> product type B)
If I define a standard filter:
Customer country IN (DE,RO)
Product type IN (A,B)
I will obtain all combinations while I only want to have the couples {(DE,A),(RO,B)}.
Thxs.
LauQ

Hide is just to remove the "object" from the display. It is used as an intermediate filter for the object that includes the logical combinations that one would like to get in the results.
In my example:
In the Query Designer:
1. Define a structure (rows)
2. right-click on it and make new selections corresponding with
a) Country=Germany (:='DE')
b) Country=Romania (:='RO')
c) Material=A
d) Material=B
3. Right-click on each of them and "hide" them
4. New formula in the structure:
TEST:=(( 'DE' AND 'A' ) OR ( 'RO' AND 'B' ) )
5. You need to edit the Cell definition and make use of the Help Cells (select therein the KF you need to display; e.g. "QUANTITY SOLD").
6. "Play" with Cell definition and define a final KF such as:
FINAL:='QUANTITY SOLD' * 'HELP'
You need to try by yourself...
Regards
LauQ

Similar Messages

  • BEx query design: defining VERY complex filters

    Hello to everybody,
    I have to build a query with a very complex filter and need some help.
    I got two main characteristics (Cost Center and Cost Element) and I want to list all data in my InfoCube EXCEPT when there’s certain combinations of this characteristics.
    It can be resumed as follows:
       If     ‘Cost Center = A’   AND   ‘Cost Element = Z’
          OR  
         ‘Cost Center = B’   AND   ‘Cost Element = Y’
       don’t show results
       Else, show results
    I’ve tried using hierarchies but it adds the results in only one line per hierarchy listed and I haven’t been able to unfold data.
    I’ve tried using conditions but :
    •  If I use only one structure (the one with key figures that I’m already using), it requires all the cells to include a key figure, and I need some cells to define the filtering values that will be exceptions; those are defined as characteristics, hence the problem.
    •  If I use variables instead of fix values to define the exceptions, I haven’t been able to enter a text as predefined value (Cost Center is alphanumerically codified).
    •  If I use two structures, the second one is a characteristics structure, so the problems listed above are solved, but then I have to define a condition based on both structures... and haven’t found a way to make it work!
    I’ve been thinking on using exception cells but it won’t work, will it?
    Maybe creating more simple queries and glueing them together would work, but can it be done?
    And last, maybe I could create a new InfoObject concatenating Cost Center and Cost Element, and a table with the filtering values to serve as reference, but I don’t know how to do it and if it will work.
    Thanks in advance!

    Hi A, how's it going?
    In the rows I`ve put Cost Center and Cost Element. In the columns a lot of key figures (about 8).
    I think excluding the exception values in the filtering area is not possible because the requirements are so complex It's necessary to use a estructure and It can't be placed in this area.
    Excluding those values from selection... well, I've tried everything I could think of! Any idea?
    J.
    Message was edited by: Jaume Saumell

  • Usage of formulas in conditions in BEx Query Designer

    Hi guys,
    does anybody of you guys know, if it's possible to use the results of formulas in conditions? I tried it, but the result of the query was "No applicable data found", but there are data for the selection.
    When I'm defining the condition with the key figure (no restricted or calculated key figure), then the query can be executed.
    In my case, I like to define a condition based on a formula result. The value should only be displayed, when the result is greater than 30.
    Any ideas or are there any bugy in the BEx Query Designer?
    Thanks a lot + best regards,
    Clemens

    Hi Clemens,
    I have created a condition in my own system based on formula and it works perfectly fine. Please check following points in your condition change mode,
    1) Condition is marked as Active.
    2) In the block "Evaluate condition below for" you will have to select "All characteristics in drilldown Independently". If you have selected combination of characteristics then you will have to maintain proper sequence otherwise your condition will not work.
    3) In the next block when you set the condition, click on new, in the first block select your Formula from dropdown and set the proper operator in your case you will have to select "Greater than" in the next column set the value of key figure and just trasnfer it.
    Now you are ready to use the condition.
    Regards,
    Durgesh.

  • Options in Assignment of Condition in BEX Query Designer

    Hi Experts,
      I am trying to define a condition in BEX Query Designer.
    I defined my condition and bit confused with Characterstic Assignment
    What Happens if is select 9What is the difference)
    1) All Characterstic in the Drilldown Independtly
    2)Most Detailed  Characterstic Along the Rows
    3)Most Detailed Characterstic Along Columns and
    4)Individual Chars and Chars.Combinations
    Thanks

    hi,
    chk the link
    Query creation
    http://help.sap.com/saphelp_nw70/helpdata/EN/f1/0a5625e09411d2acb90000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/EN/42/d21c1f46076bb2e10000000a1553f6/content.htm
    Ramesh

  • Condition (Defintion) in BEX Query Designer

    Hi Experts,
      I am trying to define a condition in BEX Query Designer.
    I defined my condition and bit confused with Characterstic Assignment
    What Happens if is select 9What is the difference)
    1) All Characterstic in the Drilldown Independtly
    2)Most Detailed  Characterstic Along the Rows
    3)Most Detailed Characterstic Along Columns and
    4)Individual Chars and Chars.Combinations
    Thanks

    Hi,
    <b>● All Characteristics in the Drilldown Independently</b>
    This setting allows you to apply a condition in a general way. Depending on which characteristics you use in the drilldown, you obtain different results.
    Note that the characteristics that are already used in an active condition for characteristic combinations are not included.
    This option is optimized for ranked list conditions, but can also be used for threshold value conditions with relative values.
    <b>●Most Detailed Characteristic Along the Rows or Columns</b>
    This option is optimized for threshold value conditions. The condition is applied to the most detailed characteristic of the rows or columns.
    Note that this function is not supported when executing the query in the BEx Analyzer. For more information, see Restrictions in the BEx Analyzer.
    <b>● Single Characteristics and Characteristic Combinations</b>
    This setting allows you to evaluate the condition for characteristics or characteristic combinations defined for specific drilldowns only. You can select any characteristic (of the characteristics used in the query in rows, columns, or in the free characteristics) or a characteristic combination.
    ○       If you only want to evaluate the condition when a certain characteristic is present in the drilldown, select this characteristic.
    ○       If you want to evaluate the condition for characteristic combinations, select multiple characteristics.
    Source:
    help.sap.com
    For more information and examples please check the following link:
    http://help.sap.com/saphelp_nw70/helpdata/EN/73/702e39074dc93de10000000a114084/frameset.htm
    Hope it helps.

  • Creating Restrictions in BEx query designer for (1-a), where a is variable.

    Dear All,
    >>  Suppose for the variable in the BEx query designer, I've created restriction for 0FISCPER to the variable 0P_PER (as 0P_PER-1) by right clicking 0P_PER3, from that a dialog box appears.  In that I've selected 0P_PER3 and then clicked on offset variable and when I set the offset variable, it works for (0P_PER-1.etc, 0P_PER+1,etc..)
    But if I want to have (1-0P_PER), then plz tell me how to define this restriction?
    Plz explain me the steps to perform (1-0P_PER) restriction in BEx query designer in BW1.
    I'm using SAP BI 7.2 gui.
    Expecting your reply soon,
    with Regards,
    Jerald

    My requirement is that I want to have " 1-fiscal year"., But this I could not define using offset variables, since using offset we can define "fiscal year +1" or "fiscal year -1". 
    So there would be some other way to define "1-fiscalyear".  So Please help me to define "1-fiscalyear"  by giving me the steps.
    Thank you,
    with Regards,
    Jerald

  • IF and ABS condition statement in BEX query designer

    Hi,
    I would like to ask the best way for me to produce an acceptable result from Excel IF and ABS Condition statement.
    The condition statement that I have on my Excel file is
    =IF((A2-B2)>0,ABS(A2-B2),0)
    I'm trying multiple times to reproduce this in BEX Query designer, unfortunately I'm getting a bad result or unacceptable formula.
    Anyone who could help me with my issue?
    Thanks,
    Arnold

    Hi Arnold,
    Thank you,
    Nanda

  • Message in BEx Query Designer Formula

    Hi Experts,
    I need to display message based on the value of the formula result. For Example:
    If K.F1 =<2.5 Then <Message: ODD>
    ElseIF K.F1 >2.5 Then <Message: Even>
    Else
    <Message: Determine the value>
    EndIF
    Thease above messages would be build in the formula column of BEx query designer
    Thanks and really appreciate your response.
    Regards,
    Waseem

    Hello,
    I have done the same funtionality with the help of workbook.
    May be experts can guide us how to display  messages in the formula column of BEx query designer.
    Thanks.
    With regards,
    Anand Kumar

  • Drilldown in BeX Query Designer

    Hello,
    I am new in SAP. I am having problem creating Drill down. I have this report where all the data is Transactional data. So I haven't created any Master Data. So I won't be able to use Navigational Attribute for Drill down purpose and I don't want to use Hierarchy. Is there any possibility of getting the Drill down in BeX Query Designer? Any help will be appreciated.
    Warm Regards,
    Debayan

    Hi Debayan,
    first of all, what is your requirement to create a drill down?
    A drill down in BEx query means showing additional information from report output. There are 3 ways to drill down a query in BEx
    1. Master data-Navigational Attributes
    2. Master data- Hierarchies
    3. Free characteristics
    As you dont have any master data in the report (which is very strange) you can use the additional characteristics provided in the 'Free characteristics' to see how the drill down works in BEx.
    Please share your exact requirement.
    Hope this helps.
    -Swati.

  • Division in bex query designer

    Hi experts,
    I have a strange problem in bex query designer. I am trying to calculate margin in % but the calculation gives the wrong result.
    The two figures I try to calculate are -25124 and -91248 (figures in 1000 NOK)
    The result should be (-25124/-91248)100 = 27,53* (when formula entered in excel)
    I have tried the following in Bex query designer
    -25124 %A -91248 = -0,02753%
    (-25124/-91248)*100 = 0,02753
    What might be the problem here?

    Thanks again for your answer,
    I will try to explain my report (requirement from the business user)
    Actual (KF)----
    Budget (KF)       
    Sales-- -91248--
    -77153         
    FSP-- -25124--
    -18918
    Margin  % -
    (FSP Actual/Sales Actual) 100---(FSP Budget/Sales Budget)100
    Dim
    Dim
    Result
    The margin is calculated in the cells in the bex query designer to differentiate between actual and budget. There is no option to calculate the margin in the columns as this would influence all other rows aswell.

  • % Calculactions in Bex Query Designer

    Hi Experts,
    Could you please on how can i perform the below % Calculactions in Bex Query Designer.
        Vendor No line item Not = L category =A  status =RFQ :for items
    Example : I have 8 items for vendorNo 200274 and only 4 as above condition and 5 items as not L(delete)
    requament: % RFQ Without Response:
    Percentage of Quotation response ={(No. of RFQReponses Received/ No. of RFQ items sent)*100},
                                                                   ( 4/5 * 100= 80%)
    Percentage RFQ without response= 100 -  Percentage of Quotation response
                                                                  =  100-80 = 20%
    How can i perform the % Calculations in Bex Query Designer.
    Vendor
    Purchasing document
    Indicator: Line Item
    Purch. doc. category
    Purch. doc. status
    Item
    Number of Records
    category A item L
    200274
    V-LINE EUROPE EXPORT MARKETING
    6000003778
    L
    A
    Not assigned
    10
    1
    20
    1
    30
    1
    6000003779
    Not assigned
    A
    Not assigned
    40
    1
    9000000046
    Not assigned
    A
    RFQ
    10
    1
    1
    20
    1
    1
    30
    1
    1
    40
    1
    1
    Result
    8
    4
    thank you

    Hope you have done some groundwork you have done on this requirement. Have you tried to create New Formula and put the required formula in it to calculate Percentage of Quotation response ?
    Your formulas seems to be straight forward.
    Keep in Filter: item Not = L category =A  status =RFQ
    You may start working on it and get back with if you are struck.

  • Where to write IF THEN ELASE statements in BEX Query Designer

    Hi All,
    I need to write a formula in query designer...
    saying that to display the all Quantities in KGs.. Now articles are in Grams and KGs...
    So here i need to perform calculation like... if article is in KGs divide by 1, else if article is in Grams divide by 1000.
    where can i write this logic to perform calculation ...
    Thanks in advance..
    ravi.p

    hi chetan,
    No its not work.. why because i  need to convert the unit of measure in Masterdata Attribute values... that means ) ' 0grooss_wt'.  this is  attribute as a keyfigure of ' 0material' .. this ' 0gross_wt' values has to convert in KGs. at Present ' 0gross_wt' values are in KG and Grams...
    I can change these values in update rules by writting  Routine.. But I need to convert it in KGS at BEX Query Designer Level..
    I need calculate like this
    quantity sold * Gross Weight. 
    here Gross Weight is the formula variable which replacing the values of gross weight...
    i tried by creating conversion types in RSUOM t-code. but it works on keyfigures of infocube.. not on attribute values of master data...
    is there any solution to solve this Problem...

  • Results based on From and To value in Bex query designer.

    Dear all,
    We are using BI7.00. In one of our report which pertains to PM user wants to get the details of number of breakdowns which falls in the value range 0 to 1 hours.
    I created a condition which has 2 variables, one is From value and the other is for the To value (since user wants to enter both the limits). I have written a condition that if the breakdown hour is greater than or equal to variable1 and less than or equal to variable2.
    Using the above condition if the query is run, i am not getting the desired output. The values avaialble in the report are 0.65,0.78,1.30,7.38,0 etc., when i give 0 to 1 i should get the values 0.65,0.78 and 0 but instead report displays "No valid results".
    I changed the condition and selected "Between" variable 1 and variable 2 - yet no change in the query.
    To my knowledge i foresee that system is not able to recognize the decimal and hence provides details only based on the whole numbers.
    How to get my requirement achieved in the Bex query designer.
    Experts suggestion with steps will be very useful to solve my problem.
    Regards,
    M.M
    Edited by: Magesh Magesh on Dec 26, 2008 11:28 AM

    Hi Magesh,
    I think you could try one more way.
    Create a formula inserting your two formula variables for limits .(FV -  are ready for input ) .
    The formula would return the result as 1 or 0 because it would have boolean condition in it.
    You could then place a condition in the query designer to only show all records where the value of the formula key fig is 1.
    You formula A would look like
    ( KF > FV1) AND (KF < FV2) * 1.
    And in the condition put A EQ 1.
    You could scale the key figures as well and multiply the limits mentioned by the users in FV1 and FV2 if decimals are still not recognized by SAP.(scaling)
    Regards,
    Sunmit.

  • Difference between  aggregation and calculation tab in BEx Query Designer

    HI,
    I am using BEx Query Designer for my report, for the key figures in the coloumn area i slected one numeric key figures, in  the properties tab i found aggregation tab and calculation tab.
    I need to sum up the total values for that particualar coloumn, when i used calculation tab i found to sum all the values for a particular coloumn, then what is the use the aggreagation tab?
    I not able to used that Aggregation tab it is showing as a hidden fields...
    can any one tell me whats the exact difference between these tabs and when we need to use which tab?
    With Regards,
    Thanesh Kumar.

    Hi Thanesh Kumar,
    I moved this thread from forum Data Warehousing to Business Explorer since it is a query related question (as SDN moderator).
    I could explain to you the difference between these two tabs.
    For "calculation" tab, it changes the display of result and does not change the calculation logic.
    It means that, if this key figure is used further in formula, still the original number (without "calculation" tab setting)  is used for further formula calculation.
    For "aggregation" tab, it changes the real calculation logic.
    The system takes the setting as the aggregation rule for records.
    The most common aggregation rule is of course summation. If you set to e.g. Average here, the system does the
    Average instead of summation when aggregating records. And the Average value will be taken for calculation
    in further formulas or other calculations.
    For "aggregation" tab, you could only use it for CKF (calculated key figure) or formula and you could not use it for
    a basic key figure. That should be the reason why you see it greyed-out.
    Regards,
    Patricia

  • New ratio doesn't appear in Bex Query designer

    Hello Experts,
    I added 2 ratios to my infocube. It activated without any problem. I then added these 2 ratios to my multiprovider and activated it after affecting them to the previous infocube.
    Then I connected to the Bex query designer and loaded a report in order to add these ratios, but there are not available for selection in the Ratio menu of the multiprovider.
    Has anyone faced this problem?
    Thanks

    Try reactivating the Multiprovider again and see if that works !
    I had this issue earlier, where I couldn't see two of the newly added characteristics in the multiprovider. But simply reactivating the multiprovider solved my issue.
    - Danny

Maybe you are looking for

  • Since upgrade to 10.5.8, frequent temporary hangs (spinning beachball)

    Good day! Since updating to 10.8.5 on my MacBook Pro (15" unibody design), I'm encountering frequent visits (every 5 to 10 minutes) by the spinning beachball which last for 30 seconds or so. At first I thought something might be slurping up all the p

  • Using a concastinated variable to indentify an object

    Hi, what I'm trying to do is loop through 81 jTextFields and disable them using concastinated variable names. I don't even know if this is possible. To clarify : I have 9 jPanes, (named Pane1 to Pane9). Each jPane has 9 jTextFields, (named a11 -> a19

  • How to use auto numbering with ENG_ECO_PUB.PROCESS_ECO (EBS version 12.1.1)

    Hi All, I'm trying to create a new ECO using the PL/SQL API "ENG_ECO_PUB.PROCESS_ECO". I want the ECO name to be automatically assigned by the system but when leaving the ECO_NAME empty (in paramter P_ECO_REC) I get the error message: "You must enter

  • Hard drive half full but cant find files to delete

    just inherited a mac book pro coming from a mac mini and it sees everything was the same even after upgrading to lion but for some reason the hard drive is half full but i thought i deleted all files the previous owner had so id like to be able to ge

  • Jasper reports and bpel?

    Is it possible (somehow) to generate pdf document using jasper reports (or any other framework for that matter) from bpel process? Can anybody guide me to any tutorial or something that adresses this kind of "problem"? I'm quite a newbie in Oracle BP