MAX( , ) function in BEx formula
Hello Experts!
Does anyone know, how the mathematical function MAX( , ) in BEx-formulas work? Which are the two parameters if i want to have the maximum of the values in one colum? Or does this function work another way?
Best Regards,
Peter
Hello Oscar!
Thank you for answer! Thats what I want to know but it doesn't solve my problem. If I use calculate result as maximum and if I want to calculate with this value (maximum) than i got a result which is calculated with the sum, not with the maximum which I see as result.
I do open a new thread for new question...
Thanks,
Peter
Similar Messages
-
How to define Excel function using BEx formula
Hi experts,
May I know how to define the following Excel function using BEx formula?
IF(AND(Revenue<0,Cost<0),"N/A",(Profit/Lost/ABS(Revenue)))
Thanks!for me its easy to implament logic with * and + rather than AND and OR respectively
((Revenue<0)(Cost<0))Value +((Revenue>0)(Cost>0)) ( Profit&Lost / ABS(Revenue))
As i have mentoned already,for Else case i have considered (Revenue>0) and (Cost>0) only.
Value can be a KeyFigure/Formula/formula variable/CKF/RKF
its not possible to type characters in the formula window so 'N/A'
Regards.
Message was edited by:
Murali c -
Percentage Function in BEx Formula
Hi matez,
I have defined a Formula as below :-
Operating EBITDA Margin = 'Operating EBITDA' / 'Operating Revenues'
How can I display this value as a <b>Percentage </b>???Hello John...
Normally when u create a FORMULA it shows a Formula symbol but if u want the Description to show or Dispay
%EBITDA its just u have to type % in the Description....
Cheers
Preethu -
Error while running IP function on BEx
Hello Experts,
I was trying to run Planning Function "Revaluation" from BEx work book with using BEx formula variable.
But I have get below error message:
*"An error occurred while communicating with the BI server"*
*"As a result of this error, the system has been disconnected from the BI server."*
*"Exception condition "INPUT_NOT_LEGAL" raised. "
My other functions and FOX are successfully running from BEx. And this specific revaluation function also runs on RSPLAN environment when I try to test under planning Sequence.
If any one has any idea about this error. I will be glad to get his/her opinion.
Thanks,
AliHello Experts,
I was trying to run Planning Function "Revaluation" from BEx work book with using BEx formula variable.
But I have get below error message:
*"An error occurred while communicating with the BI server"*
*"As a result of this error, the system has been disconnected from the BI server."*
*"Exception condition "INPUT_NOT_LEGAL" raised. "
My other functions and FOX are successfully running from BEx. And this specific revaluation function also runs on RSPLAN environment when I try to test under planning Sequence.
If any one has any idea about this error. I will be glad to get his/her opinion.
Thanks,
Ali -
How to Avoid Errors in Max Function When Data Contains Blank Cells
I have a column with duration values. However, it also contains some blank cells. These "blank cells" have formulas in them, but as the cells they reference too are blank the formula doesn't produce a result.>/p>
I want to get the max value from this column. When I simply do =MAX(column-name) I get an error, presumably because some of the cells are blank. This table is going to be highly dynamic, so I don't want to limit the range of the MAX() function to only those cells with values.
So does anyone know a solution for this, please? If I was some how able to create a formula which returned the range of cells with actual values, then I could use that in the MAX() function. Or, if I could somehow tell the MAX() function to ignore blank cells, but I'm not sure either of these are possible.
Thanks,
NicI don't see a problem with "blank" (null string) cells mixed with duration cells. MAX works fine with this mix of cells. But if the "blank" cells are numbers, not text, that gives an error.
A formula always produces a result. A formula cannot result in a blank cell. The closest you can get to "blank" is a null string (the result of two quotes next to each other with nothing between them) . So the question is, what is the result that you are calling "blank"? -
How to use rounded values in BEx Formulas
Hello,
I have the following question. Is it possible to use rounded values up to a certain # of decimal points in BEx Formulas?
I have the following problem.
Consider this:
keyfigure val 1 = 0.416666667
keyfigure val 2 = 72
val 3 (BEx Formula) = val 2 / val 1 = 172.799999862
However, what I need to do is this.
val 1 & val 3 should rounded up to 2 decimal points. So, I really need the report to show this:
val1 = 0.42
val2 - 72
val 3 = val 2 /val 1 = 171.43
I changed the number of decimal places on val 1 and val3 to be 0.00. However, it appears that these rounded values are not taken into account in the Formulas, as if the OLAP still uses the original values from the backend with 9 decimal points. So, no matter how many decimal points I use on the Display tab for a key figure, my val3 or result of my formula is always taking into account the 9 digit decimal values, not rounded values that I want. So in the example above, my val 3 comes to 172.80, which it should be 171.43 instead of you use the rounded values in the calculation.
Please let me know if there is any workaround where I could force my BEx Formula to utilize the rounded values and not actual values from the backend DSO. Or any other solution.
Thank youIf you create a Formula in BEx Query Designer like the one below, it works:
val3 = val2 / ( TRUNC ( ( val1 * 100 + 0.5 ) ) / 100 )
The TRUNC function (among other things) actually ensures that your formula takes into account the rounded values that you want. -
HI ,
I'm trying to display a column that show the 'SHARE' calculation in BEX query.
Share = (Value by Order / Total Value by Order Group )*100
<order group> <order> <value> <Share>
ABC 31000001 $200 28.57%
XYZ 31000005 $400 100%
ABC 31000007 $500 71.42%
Note : In the above, order group ABC , Order 31000001, Share = (200/700)*100
I'm unable to sum up by order group in query.
Is there any way we can utilize CKF (aggregation) or anything other method that can be used to populate this column.
Appreciate help from anyone who's familiar with this.
Thank you.
Regards,
Maili
Edited by: Maili06 on Mar 31, 2011 6:07 AMHI Divyesh,
I'm using an alternative approach. This manage to solve my issue.
I'm using SUMCT function in BEX.
I create :
Formula 1 --> formula sumct(Value)
Formula 2 --> (Value / formula 1)*100
Formula 2 provides the share percentage for me.
I placed the Order group as the first column.
You may find abt sumct here :
http://help.sap.com/saphelp_nw04/helpdata/en/03/17f13a2f160f28e10000000a114084/content.htm
http://www.scribd.com/doc/46732230/SAP-BI-Reporting
hope it helps you to solve your prob.
Regards,
Maili
Edited by: Maili06 on Apr 1, 2011 11:52 AM -
Bex formula shows empty cell (NULL)
Hi,
I have a bex formula that calculate a few fields.
sometime there is no value in it (NULL) and effects bedly on other formulas in the query. (NULL also)
i have tried several ways to solve it:
multiply with 1
IF condition
add and reduce 1
but still the column shows NULL (empty cell)
thanks a lot for helping me out
points will be granted
nirHi Nir:
Nulls used in formulas give Nulls as results. So you need to deal with the Nulls since the first occurrence, replace the Nulls and use another value instead.
To evaluate if a null is present use the function "IS_INITIAL" in your formulas, this is a boolean function and therefore has the return values TRUE and FALSE.
Unfortunately the function "IS_INITIAL" is not available for BEx queries, you can use it on transformations while loading DataTargets.
Regards,
Francisco Milán.
Edited by: Francisco Milan on May 31, 2010 1:55 PM -
BEx formula: Key figure divided by overall result
Good afternoon
I need assistance on how to do the following BEx formula please?
I have "Sales" totals per "Dealers"
example:
Dealer: Sales
A 10
B 5
C 6
Overall Result = 21
How do I create the formula in BEx if I want to divide Sales for dealer A (10) with the 'Overall Result' Sales (21)? Note,
Your assistance will be appreciated.
Cj FaurieCreate a <b>Formula</b> below the <b>Sales Key Fig</b> and use the follwoing <b>formula</b>
<b>Sales / SUMGT ' Sales'</b>
<b>SUMGT</b> will be available in the <b>Data Functions</b> -
Can i now exact bex formula to be inserted
Can i know the bex formula to be used by if else statement in bex query.
if f9 greater than e9 then result should be E9*B9 else F9*B9
IF(F9>E9,E9*B9,F9*B9)Hi Naiduz,
There I have missed one point, you have to create a formula variable for both these fields and with replacement processing type. Then only you can use the formula like this.
Hope this clarifies totally.
Kindly refer the doc for more understanding. It has been explained crystal clear here.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d08b56a8-daf5-2e10-2397-904d6aeb55c2?QuickLink=index&…
Thank you.
Chandan Praharaj -
BEx Formula Use of 'Logical And' and Calculation for Gross Margin
HI Bex gurus.
Having an odd time with what should be a simple formula to handle the display of gross margin (GM). The goal here is to display GM% properly and the requirement is as follows
If GM <= 0 then 0.0
Else
If GM > 0 and Sell > 0 then ( ( sell - cost /sell ) * 100 )
Else
If GM >0 and Sell = 0 then 100
I am familiar with bex formulas and have referenced the help docs on booleans here -
Boolean Operators - SAP Business Explorer - SAP Library
But what is odd is that if I use a calculation or a CFK in the IF, THEN with a LOGICAL AND, the formula does not report correctly
If I put in a static value, like 77, the expected logic is followed. I have tried making sure have extra parentheses and changing the order of the statement, to no avail! I could use some extra brains on this puzzling matter, so you help is greatly appreciated and will award points!
Thanks
lee lewis
Here are the formulas in text and below screen shots. Wish could copy and past formulas to and from editor!
GM%77
( ( ( 'Order GM' >0 ) AND ( Order Sell > 0 ) ) == 1) * 77 + ( ( ( 'Order GM'> 0 ) AND ( Order Sell == 0 ) ) == 1) * 100 + ('Order GM' <= 0) *0.0
GM%
( ( ( 'Order GM' >0 ) AND ( Order Sell > 0 ) ) == 1) * 'REF GM%' + ( ( ( 'Order GM' > 0 ) AND ( Order Sell == 0 ) ) == 1) * 100 + ('Order GM' <= 0) *0.0
'REF GM%
(order sell - order cost /order sell ) * 100 )
GM%77
GM%Shouldn't you change on of the brackets in your REF GM% ?
'REF GM%
(order sell - order cost /order sell ) * 100 )
I would put that as
'REF GM%
(order sell - order cost) /order sell * 100 )
Not sure what you mean with those red arrows... but in both cases you would be dividing by 0 (order sell = 0). -
Filter Function in Column Formula is not working properly
Hi,
I am using Filter Function in Column formula tab in Answers to calculate the Total sum from the start of the Fiscal month to the Month selected from the Prompt.
My requirement is I have total sales column. Now I need to calculate TYYTD kind of thing for which I cant use the Time sereis due to my report constraint.
Instead of that I am using this Filter function on TYYTD column where i am giving the filter as start of the Fiscal month to the month selected from the Prompt.
For example if I select May month from the Prompt then this TYYTD column should give me SUM(Total Sales) between Feb and May for which I am using the Filter Function. But it giving me only May sales whcih is same as Total Sales column.
Can anyone throw some light on this as this is very important for us or any alternate solution other than Time sereis measures.
Did anyone got this kind of issue with Filter Function?
Regards,
AzadOk...here's the steps to fix this as efficiently as possible. I have a whole bunch of mailboxes under "On My Mac" and they have a bunch of mailboxes nested in them. I get my messages into Apple Mail via IMAP. (I don't know if this matters.) The steps below assume you have a similar setup.
1. Hold the Option key down and click the dropdown arrow next to each mailbox that has one. This will cause all nested mailboxes below it to appear.
2. Go to the top of the list of mailboxes under "On My Mac" and highlight the first mailbox. Then hold the Shift key down and highlight the last mailbox in the list. This will cause all of the mailboxes and nested mailboxes to be highlighted.
3. From the menu, select "Mailbox --> Rebuild" and the rebuild process will start.
4. Watch the top of the mail screen to see the message count change as the mailboxes are being rebuilt. Wait until the activity stops before doing the next step.
5. As the mailboxes were rebuilt, many messages were reset as "Unread" even though every message was previously "Read." Make sure the mailboxes you want to affect are still highlighted. Right-click and select "Mark All Messages Read."
That fixed the problem for me. -
Hi Everyone,
Am aware of the following flavors of MAX function
1) choose MAX from the folders/fields list (selected items tab)
2) create calculation using: MAX keep dense
3) create calculation using: MAX analytic function
questions, pls:
===========
a) with MAX regular, MAX keep dense, MAX - analytic function
is it necessary to sort it using tools/sort - choose fields to sort by?
or does the data get sorted due to the ORDER BY clause in MAX used in a calculation
b) how to understand the diff. bet. MAX keep dense and MAX - analytic function
1) i understand that analytic functions are applied after detail row processing
does MAX keep dense calculation happen during detail row processing?
2) how did you know to advise when to use MAX keep dense, and when to use MAX - analytic function?
tx for your ideas and assistance, sandraHi,
a) with MAX regular, MAX keep dense, MAX - analytic function is it necessary to sort it using tools/sort - choose fields to sort by? or does the data get sorted due to the ORDER BY clause in MAX used in a calculationIt is only necessary to use a sort if you want to have the rows returned in a specific order. The order by in the max calculation defines the maximum within the group or window. It may affect the order the rows are returned, but if it does this is not guaranteed and you should use a sort on the main query.
b) how to understand the diff. bet. MAX keep dense and MAX - analytic function
1) i understand that analytic functions are applied after detail row processing does MAX keep dense calculation happen during detail row processing?Yes
2) how did you know to advise when to use MAX keep dense, and when to use MAX - analytic function?In general, if you want the result on a single row, so you have one row for each group then you should use the aggregate max. If you want to use the same max on all the rows in the window (defined by the partition) then use the analytic max.
Rod West -
USER DEFINED FUNCTION in the formula editor
How do you create a USER DEFINED FUNCTION in the formula editor using BADI
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/frameset.htm">This</a> may help.
-
Can I use the value returned from a Text Function in another Formula?
I'm writing a report in Hyperion System 9 BI + Financial Reporting Studio version 9.2. I have 2 grids in my report.
Grid1 Column A is set up as a text function using the function type - <<GetCell("Grid2", 1, a, 1)>>. I would like to use the values returned from this text function in Column A (Grid 1) in a formula in Column B (Grid 1).
Is it possible to use the values returned in Column A of the text function in another formula? My report does not seem to recognize Column A as numerical values, even though the values to be returned are numerical.
If so, how do I recognize the values in Column A Grid 1 as numerical values and not text?
Thanks for any help you can offer!Hi Edson,
Yes you need to use the CALC_ERROR macro function to be able to test whether the last macro function returned an error. CALC_ERROR will return an 'X' if there an error occured during the execution of the last macro function.
You can use a macro similar to the following:
IF
CALC_ERROR( )
= 'X'
DO SOMETHING HERE
ENDIF
Let me explain how this works internally. The SAP system maintains a global variable g_flg_calc_error during the execution of macros in the planning book. The g_flg_calc_error variable will contain the value of f_calc_error that was set by the last macro function which executed. The ABAP coding of a planning book is something like this:
data: g_flg_calc_error type /SAPAPO/FLAG.
* SAP will pass g_flg_calc_error variable to all macro
* functions. When SAP calls a macro function, it does
* something like this.
call function '/SAPAPO/MACRO_FUNCTION_HERE'
exporting
plob_values = i_s_adv_plob_values
sdp_book = g_c_advf_sdp_book
sdp_view = g_c_advf_sdp_view
tables
cols_index = i_t_cols
value_tab = l_t_value_tab
changing
f_calc_error = g_flg_calc_error
As you can see, the g_flg_calc_error variable
is passed in the "changing" part of the call. The macro function being called can then use the f_calc_error
variable to change the value of the global
g_flg_calc_error variable. In fact, the macro function being called can also check (by looking at the f_calc_error variable) if the last macro function reported an error. The CALC_ERROR macro function just checks the value of f_calc_error parameter (w/c in fact is the value of the g_flg_calc_error variable) and returns "true/X" if the f_calc_error was set to true by the last macro function.
Hope this helps in clearing things out
Maybe you are looking for
-
2009 Macbook unable to boot in any fashion
I was recently given a broken Macbook from a friend who didn't want it anymore, and had no interest in fixing it. It's a 13.3" Macbook from 2009 with a 2.0GHz Core 2 Duo processor, 2GB of 1066MHz RAM, and an Nvidia GeForce 9400M. Since I can't get it
-
Function Module to Download Internal table in EXCEL
Hi All, I need a Function Module to download the Internal table to Excel File. I Have used SAP_CONVERT_TO_XLS_FORMAT, but this function modules are using GUI_Download indirectly. I dont want to use GUI_DOWNLOAD as i am going to call this Function Mod
-
Must I purchase an ADSL modem from my ISP
I have had adsl service for many years. I am currently using a modem purchased from my ISP. I am thinking that it is getting near the end of its useful life. Must I purchase the replacement from my ISP or can I buy an Airport Extreme base station?
-
Remove Old Doc Library Storage References
I have an 8.02 HP3 post office that is complaining about old Library Document Storage areas There DSA's were re-defined years ago but there seems to be a reference to them still hanging around somewhere (I presume in the PO or Library DB) All our lib
-
ive tried everything ive read on here plus search www... still comes up with the error in step 6 of 6 while syncing.. or about a third of the way in if performing a manual backup driving me nuts!!!!!!!!!!!!!!! anyone got other ideas??