Boolean operators in formulas in a query?
Hi,
I'm wondering how following condition could be solved (written)in a formula, A and B are sub formulas or KF:
IF A==0 THEN A*B ELSE (A-1) * B.
Best Regards
/Daniel
Hi
IF A==0 THEN A*B ELSE (A-1) * B.
can be written as:
(A = 0) * ( A * B ) + (A <> 0) * (A - 1)
as the A = 0 will return 1 if true and otherwise 0.
Have a nice weekend
Kristian
Similar Messages
-
Writing formula with boolean operators
Hi,
I need to write a formula that will, for a key figure, recognize if the cell is blank and if so convert it to zero. So for example,
if (keyfig = ' ') , then (keyfig = '0')
How do I do this using the boolean operators supplied to us for writing formulas and calculated key figures????
Thank you!Hello CM,
Have a look at this:
http://help.sap.com/saphelp_nw04/helpdata/en/23/17f13a2f160f28e10000000a114084/content.htm
Please, remember to use the search option on this forum, as I think that a lot of threads already mention this.
Hope it helps, -
Before aggregation with boolean operators
Hi gurus,
does someone know if there is a way to force a bex formula, defined by a boolean operator, to be executed in "before aggregation" mode?
For example, let A and B two propositions, and KF1 and . We define the following formula key figure
<b>(A) * KF1 + (B) * KF2</b>
where (A) = 1 if A is true and (A) = 0 if A is false.
My question is: is there a way to force this formula to act before aggregation.
Thank you very much
MatteoI cannot do that, because you can set "before aggregation" property only for KF that are built on basis KF. But I have to built my formula using boolean operators that are not basis KF.
That's why i cannote use "before aggregation" in the properties of my KF.
thank you
matteo -
How to assign current date/time to a formula variable in Query Designer
How do I assign the current date to a formula variable in Query Designer? I need to use current data in a calculation and just need the date the report was run.
ThanksHi Philip,
There is an SAP formula variable to supply the current date in a formula. I think it is 0F_ADAY...install it from business content if you cannot see it in the query designer (formula box, under formula variables) and try using it.
Hope this helps... -
XML Boolean Operators in fsiuser
Hi All,
We define BatchingByRecip batches in our fsiuser file, and we often write custom XPATH statements to use input data to send certain transactions to a certain recipient group. We've had good luck with very simple XPATH statements, such as:
Batch_Recip_Def = !/Transaction/Confirm/CompanyInfo[CompanyCode='0002'];"BatchGroup1";Client
However, we've recently had some requirements to add multiple conditions to these XPATH statements, and we haven't been able to get boolean operators to work. We're trying to do something like this:
Batch_Recip_Def = !/Transaction/Confirm/CompanyInfo[((CompanyCode= '0001' or CompanyCode = '0003'))];"MINNESOTA";Client
This seems like a reasonable requirement, but we haven't been able to get this to behave correctly. Has anyone been successful with something like this? Thanks for any help!You can mix DAL usage with this sort of rule like this:
< BatchingByRecip >
Batch_Recip_Def = =DAL("My_Script"); ... ; ...
Basically, most places that accept a search mask of ?token or typically the xpath starting with ! will also accept the =DAL() or =GVM() type macro call. The "=" macro feature has a number of options like:
=(expression) returns the value of a DAL symbol represented by "expression"
=DAL(expression) returns the value of a DAL script named by "expression"
=GVM(expression) returns the value of a GVM symbol named by the expression
=@(expression) returns the value of a source field
So, in the DAL script you can do whatever you need to do - write a complex IF with as many XPATHs as you need connected with AND or OR, etc, and be sure to return "TRUE" if you want this batch.
Not sure how far back the equal sign macro feature goes, so if not in 11.3, my apologies in advance. -
Mountain Lion Finder has no boolean operators? Where? When?
Mountain Lion Finder has no boolean operators? If so, where? If not, when? THANKS
Are you talking about the Find window?
If so, just add the criteria you want by clicking the + button. By default, they are Ands. If you want to Or them, or Negate them, hold down the option key and click on the + button. -
Curerency conversion for a Formula in the query designer
Hi
I have a ' Financial Loss Formula' in the report. I want to convert this 'Financial Loss' into USD Currency at query designer level.
Source Currency = SAR
Target Currency = USD
So how can i do the curerency conversion for a Formula in the query designer.
pls let me kow
kumarHi,
If you define your query conversion in BW then it is easy to do currency conversion through Bex.What you need to do is use calculated key figure instead formula and do a right click select properties there at the currency translation area you ca select defined currency conversion in BW and your target currency.
/people/rasim.manavoglu/blog/2007/04/30/currency-currency-currency
Regards. -
Creating formula in the Query Designer
Hi,
I have a KF which I have to convert in to different unit in the query ( x/data)
The problem is some of my data in the cube is zero (0) and when I use division, it shows me error (red X) in the query output.( Divide by zero)
Is there any way to skip this division if the data is zero? How can I set my formula in the Query designer?
Thanks
M Kumar.Hi,
Please use the NDIV() or NOERR() function outside of your expression and it will take care of the division by zero.
See here for details:
http://help.sap.com/saphelp_nw04/helpdata/en/03/17f13a2f160f28e10000000a114084/content.htm
Hope this helps... -
Fox Formula Variable In Query Designer
Hi Experts,
I have created 1 variable in fox formula of type VARV and i want this Variable to show in query designer while creating new Variable so that i can replace the Query Variable With Fox Formula by Using Replacement Path.
While Creating new variable in Query Designer it is not Showing that Fox Formula variable.
Because i want to use this in WAD While Executing the Planning Sequence.
Is there any way we could get That Fox Formula variable in Query Designer.
Regards
GirishHi Marc,
While Creating Variable from Query Using Query Properties it is still not Showing That Variable in Fox Formula.
And My Requirement was to Replace that Fox Formula Variable With Query Designer Variable.
Please Suggest any Solution.
Thanks
Girish -
Hey Guys,
I am trying to add a formula in my query, i have the asset acquisition value and the accumulated depreciation value in different columns. I want to get column A - column B in column C.
How can i do this?
Thanks,
ZaidThe fields that you want to use in the calculated field will need to be included in the Field Selection list in your query (I don't think you have to include the fields in the query output, but they do need to be available in the Field selection).
After reading your reply, I realized that I forgot a step... sorry... After going into the Field Selection, but before creating the local field, you will need to assign short names to the fields you want to use in the calculation. To assign short names, you'll first need to turn on the short names column, if it's not already displayed. Select Edit -> Short names -> Switch on/off. Find the fields to be used in the calculation. For each field, enter a unique name in the short name box next to the field.
Once you've assigned short names, you can create the local field. Use the short names for the fields in the calculation. And after you've created the local field, be sure to assign it to the query output.
Regards,
Shannon -
Implementing Boolean operators during find object for qualification
Hi Team
We would like to maintain requirements profiles for PD object (position,job etc.) in terms of qualifications (Q) using complicated boolean operators , for example :
((Q=English>4 OR (Q=French=5 and Q=Spanish>2)) OR (Q=German=6 and english<3) and Q=education # 2
The complicated boolean operators could be also : range,excluded from the range,equal,not equal,not exits.
We would like to execute the search for qualification ,profile matchup based on this complicated boolean requirments profile.
Is there any custom development or configuration to make this happen ?
Best Regards
DrorIs this still true if the Collection generics elements are an interface type? For example, in the
code I sent earlier, I have:
/** The authorities granted to this account. */
private Set<Authority> authorities;
But Authority is an interface that is implemented by the DefaultAuthority class (maybe others
eventually). I was under the impression that in this situation, the metadata does have to provide
the actual type that will be in the collection.
But even if it works in Kodo, one of the requirements of my project is that the JDO implementation
be swapable with JPOX. When I started working on it, both Kodo and JPOX were at a much earlier stage
of implementing JDO 2, and if I recall correctly, JPOX required the implementation class (though I
don't know if it had to be fully qualified). I'm not sure that requirement has been removed from
JPOX yet, though I haven't checked in a while.
Thanks for your help with the default value settings though. Is there any place where I could have
found that behavior documented (Kodo docs, JDO2 spec, etc.)?
Mark
Abe White wrote:
p.s. You don't need to set the element-type in metadata if you're using
Java 5 generics; we can get the element type from the field declaration.
Also, when you do have to declare an element-type in metadata, you
don't need to fully qualify the class name if the element class is in
the same package as the field's owner (the current <package>), or in
java.util, java.math, java.lang. -
OBIEE - ESSBASE ERROR - 1200467 - Error executing formula for [MDX query]
I have an issue on essbase with a query with 50 member filters.
The environment is OBIEE 11g over ESSBASE 11.1.2 with an ASO cube.
The user for essbase are with database access filters.
I have the following issue, OBIEE returns a query that filter 30 members and the query runs ok, but the same query with a 50 member filter returns the following error when i execute it on MAXL :
MAXL Error
ERROR - 1200467 - Error executing formula for [MDX query]: status code [1130203] in function [].
ERROR - 1241101 - Unexpected Essbase error 1200467.
i paste an example of the query that returns OBIEE
With
set [_Account2] as '{Distinct({[Account].[Allocated FTE - Budget]})}'
set [_Employee0] as '[Employee].members'
set [_Fund4] as 'Generate([Fund].Generations(2).members, Descendants([Fund].currentmember, [Fund].Generations(4), leaves))'
set [_Position4] as '{Distinct({[Position].[POS111165], [Position].[POS111166], [Position].[POS111167], [Position].[POS111540], [Position].[POS112331], [Position].[POS113201], [Position].[POS113247], [Position].[POS113248], [Position].[POS113540], [Position].[POS113618], [Position].[POS113954], [Position].[POS114109], [Position].[POS114194], [Position].[POS115224], [Position].[POS115912], [Position].[POS115913], [Position].[POS116727], [Position].[POS117229], [Position].[POS117491], [Position].[POS117587], [Position].[POS117610], [Position].[POS117979], [Position].[POS119456], [Position].[POS121262], [Position].[POS121458], [Position].[POS121698], [Position].[POS123368], [Position].[POS124027], [Position].[POS124028], [Position].[POS124110], [Position].[POS124396], [Position].[POS125623], [Position].[POS125624], [Position].[POS126476], [Position].[POS127960], [Position].[POS129352], [Position].[POS129468], [Position].[POS129494], [Position].[POS129535], [Position].[POS129608], [Position].[POS129679], [Position].[POS129730], [Position].[POS129905], [Position].[POS130010], [Position].[POS130144], [Position].[POS133456], [Position].[POS134943], [Position].[POS135231], [Position].[POS135404], [Position].[POS135734]})}'
set [_Program3] as 'Generate([Program].Generations(2).members, Descendants([Program].currentmember, [Program].Generations(3), leaves))'
select
{ [Budget Item]
} on columns,
NON EMPTY {crossjoin({[_Account2]},crossjoin({[_Employee0]},crossjoin({[_Fund4]},crossjoin({[_Position4]},{[_Program3]}))))} properties GEN_NUMBER, [Account].[MEMBER_UNIQUE_NAME], [Account].[Memnor], [Program].[MEMBER_UNIQUE_NAME], [Program].[Memnor], [Employee].[MEMBER_UNIQUE_NAME], [Employee].[Memnor], [Fund].[MEMBER_UNIQUE_NAME], [Fund].[Memnor], [Position].[MEMBER_UNIQUE_NAME], [Position].[Memnor] on rows
from [BCPSASO2.BCPS_ASO]
any suggestions ?
Thanks
Niko
Edited by: user8367101 on Mar 1, 2011 10:31 AMHere it is:
It is a Windows Server 2003 R2
Processor 8393 SE
31.9 GB of RAM
32-Bit
How does "memscaling" works?
I also think that are high but it is the way it was configured before I managed the application. For my DB
Index Cache setting: 205800
Index cache current value: 205800
Data file cache setting: 33768
Data file cache current: 0
Data Cache setting: 877273
Cata cache current: 71540
Block Size: 65408 -
Boolean operators (and/or, etc.) in bridge spotlight search?
Anyone know if boolean operators are possible in Bridge's spotlight search field in the upper right?
I realize it's available through edit > find, and that smart collections can be saved, but looking for faster ways.
Would be much obliged for any help, thanks!Anyone know if boolean operators are possible in Bridge's spotlight search field in the upper right?
I realize it's available through edit > find, and that smart collections can be saved, but looking for faster ways.
Would be much obliged for any help, thanks! -
Supress Result rows of a formula in a query
Dear SDN's,
How to supress Result rows of a formula in a query.
For a particular characteristic we can do easily in a query,but how can we restrict result rows for a particular formula?
Thanks and Kind Regards,
Lakshman Kumar GDear Lakshman,
If u supress Result rows for a characteristic,,,then all the key figures for that characteristic,,,,this supression rules applies..
and hence for that particular formula, Supress the relavant characteristic..
It is as simple as that...
Hope this helps u..
Best Regards,
VVenkat..
Edited by: Venkata Narayana Jakkampudi on Jan 5, 2009 5:07 PM -
How to write a formula using Boolean Operators?
Dear BW mates,
I have two Key Figures <b>stock</b> and <b>Prevous 12 week Stock</b>.
I want to calculate <b>Excee stock</b> from these with the following condition.
If <b>Prevous 12 week Stock</b>is less than <b>stock</b>then substract <b>Prevous 12 week Stock</b>from the <b>stock</b>. Thease substracted value is the <b>Excee stock</b>.
Thanks,
SBHi Reddy,
Create a formula 'a' as i said first or you can use
(Stock-Prev. 12 week sale ) directly in Excess Stock
formula.
<b>Excess stock = ( Stock >Pre.12 week Sales )*(Stock-Prev. 12 week sale )</b> .
Formula works like this:
if Stock>Prev 12 weeks sales,
Excess Stock = 1 * (stock - Prv 12 weeks sale) = stock - Prv 12 weeks sale
if Stock is not greater than prev 12 week sale,
Excess Stock = 0 * (Stock-Prev. 12 week sale ) = 0.
have you got it?
i assume Stock and Prev 12 week sale Keyfigures are of same units.
thanks
Message was edited by: Murali
Message was edited by: Murali
Maybe you are looking for
-
My daughter's iPod is using voice over and won't scroll. What setting did my child click? It will allow me to use voice control, but i need to know what's wrong first so I can give the correct command.
-
Macbook system preferences won't save
My system preferences, such as dock and trackball settings don't save when I restart my computer. After setting all preferences to my liking, added and removed apps from the dock, even moved the dock itself only to find everything upset when I turn
-
Upscaling MEMORY to a MACBOOK PRO.
Hi everyone, just asking people for help making up my mind in the matter of upscaling the RAM memory of my new 2,2 GHZ MACBOOK PRO. *I want to upscale to 4 G´s with the Kingston package.* *Is it a good idea going to 4G´s?* *Is it the best brand?* *Sh
-
why is iphoto faster loading images in full size than aperture? aperture loads a proxy (lower res) image with the "loading" sign ontop of it and it takes several seconds until the full res high quality is loaded. while in iphoto it's loaded instantly
-
Nokia N95-3 crashes when using Voice Mailbox (yes,...
Hi, As reported by previous N95 users, N95-3 (10.2.006) crashes when you use the #1 shorcut for voicemail, and as stated previously if you dial the number, or use it inside the speed dial app, or even with voice command it works. After researching I