Query designer - calc diference between lines
Dear coleagues,
i need to calculate diference between actual line and last line like this example::
Material Month Value Diference with Last Month
A0001 01 100,00
A0001 02 150,00 50,00
A0001 03 250,00 100,00
How can i do this on Query Designer ??
Thanks in advance.
Fabrício
HI ,
Just a try ,
Create a calculated KF1 with value --> with first value in exception aggregation tab --> with reference characteristic as Month
Create a calculated KF2 with value --> with Last value in exception aggregation tab --> with reference characteristic as Month
KF3 = KF2 - KF1
Regards,
Sathya
Similar Messages
-
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 youHope 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. -
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 -
In query designer, an hierarchy(structure) duplicating lines in level 2.
Here we are at version 7.0 - SP 10, I have created a structure hierarchy in BEX, and when I execute this query the result is ok ... until I tried to closed or open the second level.
At first, it doesn't close, and the worst if I tried to open it's
duplicating the lines of the second level.
In query designer, creating an hierarchy(structure) something like this:
> total division 1
...> division 1.1
...> division 1.2
> total division 2
...> division 2.1
...> division 2.2
and after the execution, if I tried to close or open the level of division 2 the result will duplicates the lines division 2.1 and division 2.2. the result is like this:
> total division 1
...> division 1.1
...> division 1.2
> total division 2
...> division 2.1
...> division 2.2
<b>...> division 2.1
...> division 2.2</b>
The stange is in excel it works normaly.
Best regards,
Silvio MeurerHi,
An Heirarchy is always an addition of the below nodes. hence. WBS 1 = WBS 1.1 + WBS 1.2. since youre looking at durations. it will add up 7+9 instead of looking at earliest start and latest end dates.
dont know if itll work but a suggestion would be to get the start date and end date for WBS 1 and then do the calculation for duration in a formula in query designer.
regards,
Dilanke -
Query Designer - Rows between Columns
Dear all,
I've got the following requirement and I really cannot figure out if it is doable.
I would appreciate your help.
I shall create a query using Sap Query Designer regarding the actual and budet data of the assets (it's a financial report).
I'll have 2 columns for the actual data and 2 columns for the budget data.
Is there any way:
a) to have the assets (the rows) in the middle of the report layout, and
b) the actual data on the left side of the assets, and
c) the budget data on the right side of the assets
The goal is when drilling down the assets, both pairs of columns to be expanded as well.
Is it doable? Is there any trick?
Thanks in advance.Dear Riyez
I do thank you for your response.
I am wondering if there is something someone could possibly do on the Query Designer side in order to fool the system.
For instance, to design a virtual structure (I do not know how - I am thinking loudly) which would be identical to the structure that holds the assets?
In other words, is it designeable to have a row structure, then the column key figures and, finally, another row structure identical to the first one? And when the user expands the first structure, the second structure will follow accordingly?
Or such a solution is out of question? -
Dependency between two Variables in query designer filter prompt
Hi Experts,
I'm working in BW 3.5 query designer and I have two characteristics ZONE and PLANT (both are filter variables) and what I need is that when the user make a selection of one ZONE (for example Zone north) then he will be able to see in the Plan Variable the values for selection that corresponds with the Zone selected previously in the other filter variable (ZONE).
Thanks in advantage
Roberth ReyesHi shanthi bhaskar,
Thanks a lot for your answer.
I have one doubt about it: with this solution that you propoused the user will be able to select the values for plant?.
I mean, the user make the selection of the value for Zone, then he wants to see the in plan´s variable the values that corresponds with this Zone for make a new selection of plan.
What happens if I need this dependency also in another variable like time variable?
Thanks a lot -
Formula creation in Query designer
Hi All
I want to explain a bit more on my requirement .
I have supplied qty and ordered qty and i have the difference between both which is called as service level as %. there will always be 100% for some suppliers and lessthan 100% . So i want to count only the 100% suppliers and divide by all the suppliers . so that i can get the perfect order . and the formula is below .
I need to apply a formula line count with 100% / line count in one of my querys how to do it the qury designer . Can you anybody guide how to do it .
Thanks in advance . I am sorry if i have posted in the worng fourm .
thanksyou must be having an infobject refering to say supplier say supplier no. ( like customer number).
STEP 1: create a new CKF ( formula in query designer on right columns panel)
STEP 2: create a formula variable with reference characteristic as supplier no . replacement path replaced with infobject->attribute value - constant 1.
STEP 3. you CKF " NO OF SUPPLIERS" definition would be as below
supplier counter .
STEP 4. identifying 100% suppliers.create a new CKF " NO OF 100% SUPPLIER " ( formula in query designer on right columns panel).
it definition would be
supplier counter * ( ordered qty == supplied qty ).
where supplier counter is formula variable. this will give total counts of supplier where ordered qty == supplied qty.
STEP 4.
divide CKF " NO OF 100% SUPPLIER " / " NO OF SUPPLIERS" -
Creating customer formula to be used in the Query Designer
hi,
How can i code a specific formula to be used in the query designer. As an example, i need to calculate dynamically working days between two dates.
i tried to find the corresponding BAdl interface with no success..
Do you have any suggestion ?
LudovicHi..
I have a scenario ... it may help..
The group HR administrator wants a detailed line item report that lists all employee absences in a given period. The report is to show the employee number, the absence start date, together with the end date of the absence and show the number of calendar days the employee was absent.
The good thing about using this technique is that no redesign work is needed from your technical BW team, no ABAP is involved and best of all, it quick and easy.
Solution:
For this example I created an ODS object called Absence that holds basic employee information along with individual absence record data.
Follow the steps below:
Open the BEx Query Designer and create a new report on your chosen InfoProvider.
Drag the Employee, Valid from and Valid to characteristics into the Rows section of the screen.
If needed, apply data selection restrictions to the characteristics as pop up
Right click on the Key Figures structure and select New Formula
In the new formula window right click on Formula Variable and choose New Variable
The Variables Wizard will launch and will require you to specify the variable details.
( Click the NEXT button if the Introduction screen appears )
Enter the variable details on the General Information as shown in pop up
Enter the Variable Name , Description and select Replacement Path in the Processing by field.
Click the Next Button.
In the Characteristic screen (pop up) select the date characteristic that represents the first date to use in the calculation (From Date).
Click the Next Button.
The Save Variable screen (pop up) displays a summary of the new variable.
Click on the Finish button to save the variable.
Repeat steps first four for to create a second variable for the second date to be used in the calculation.
In the example shown, the characteristic 0DATETO is used to create the variable ABSEND (Absence End Date)
Define the Calculation............
The new calculated key figure will now show in the columns section of the BEx query designer
excute...
with regards,
hari -
Text value is not getting displayed in Query designer !!
Dear experts..,
i have created a new query in query designer using my info provider and then selected one field in default value and then trying to restrict that particular field while selecting the restriction in query designer am getting the exact text value but after generating the report instead of text value , key value is getting displayed....so how can i get text instead of key value??
please help me friends....
i have posted in OSS mesage also...i got a reply like...even i didnt understand his reply too...what he is trying to say?
whether can i get text display or not???
can any one help me in this regard???
SAP Reply----
Hello kumar,
After another analysis I have to inform you about general concept of
"compounded characteristics".
A compounded characteristic bounds two characteristics. The technical
name is generated by both technical names of the two characteristics
combined by two underlines "__".
An individual text is only available for one single combination of both
characteristics.
Example:
=======
Compounded characteristic "Famous family name" is a combination of
characteristic "COUNTRY" & "ETHNIC". Technical name: COUNTRY__ETHNIC
Values for Country: USA, Australia
Values for Ethnic: Asian, Latino
Possible value combinations with individual text:
USA & Asian; text: "Ling"
USA & Latino; text: "Sanchez"
Australia & Asian; text: "Chu"
Australia & Latino; text: "Garcia"
(Keep in mind the individual text only valid for the specific
combination.)
In analogy to the issue that you reported, you want to restrict this
compounded characteristic. In the window where you select the restrictedvalue (called Selector) you'll see on the left hand side all available
combinations of the characters with an individual text.
You select family name "Chu" and drag'n'drop it to the right side.
Actually you can only restrict the right compounded characteristic. In
our example you would restrict on characteristic "ETHNIC" with value
"Asian". (When you switch on technical names this comes more clear). Thetext "Chu" is displayed in the context of Selector because you selected
value combination Australia & Asian. But in the end it's just a
placeholder(!) for any combination of characteristic "ETHNIC" and value
#Asian#; in our example it could be USA & Asian "Ling" or Australia &
Asian "Chu").
By leaving the Selector the individual text is gone because now the
context is lost between the two characteristics. You have just a
restriction on characteristic "ETHNIC" with value "Asian". An individualtext can't be displayed because the compounded characteristic is not
specified for this restriction.
You're right, it is confusing when "loosing" the text of a restriction.
But accoring to the concepts of the compounded characteristics it
is a correct behavior.Hi anandkumar,
I belive this issue can be resolved by changing the Query proprties for the perticular field.
Kindly check the Field proerties in query designer and ensure that Text is enabled ather than Key.
__Field property check up:__Go to query designer->click onn the field-> Right hand side in properties click on display tab-> select Text in drop down menu of Display as tab.
FURTHER CHECK UP: check the master data avaiulability for the perticular info object, if masterdata is not available, do the text data for txt data availability in report level.
Hope this helps you!!
Best Regards,
Maruthi -
Error while opening a query in query designer
Hello all,
There is an issue with the BEx Query Designer. A user is facing the following error while he tries to open a query using the Query Designer.
Error:
Error Group
RFC_ERROR_COMMUNICATION
Message
Connect to SAP gateway failed
Connect_PM GWHOST=10.233.0.167, GWSERV=sapgw00, SYSNR=00
LOCATION CPIC (TCP/IP) on local host
ERROR partner '10.233.0.167:3300' not reached
TIME Wed Nov 26 16:35:58 2008
RELEASE 710
COMPONENT NI (network interface)
VERSION 39
RC -10
MODULE nixxi.cpp
LINE 2985
DETAIL NiPConnect2
SYSTEM CALL connect
ERRNO 10060
ERRNO TEXT WSAETIMEDOUT: Connection timed out
COUNTER 1
Please help me in resolving this issue.
Regards,
Shahid Ahmed.Connect to SAP gateway failed
You cant connect to gataway, may be it's down to (if you have
some issues going on the server
Regards. -
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 AMHi 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. -
How to hide a single value node hierarchy in the query designer
Hi,
I would like to perform a calculation in the infocube. It concern a count "Nb of different customers" with the following hierarchy : Country / region / City.
This KF would be read at the same time by city, region and country, and certain customers exist in 2 different region, and I have to count them only once by country.
To do this, I added a new record (at the country level when loading infocube) to deduct a number of customers in doubloons.
This line added contain only a country code and the number of cutomers in doubloons (- 23 when I have 23 cutomers in doublons) with revrese sign.
Now, I would like to use this value (-23) to have a right Nb of different customers by country, without showing the not assigned line in the report hierarchy.
How can I hide, in the query designer or the WAD, a single value node from hierarchy (NOT assigned) but take in account the value (-23) at the country level ?
Is there another solution (more simple) to perform this in the infocube ?
For information,
1) The infocube is loaded once per month, and the KF (Nb of different customers" is also performed by month.
2) I can't perform this in the report (performance problem with calculated KF).
thx.Hi,
the short answer is "you can't", the longer is: The ADF Faces tree component is stamped for better performance. This stamping means that nodes are not rendered as JSF objects but copies of an existing component (just with a changed value). For this reason the nodes don't issue their own query for data and thus cannot be refreshed individually
Frank -
Unable to open query designer while able to access BI system
Hi Experts,
I have problem while opening query designer, analyzer , WAD . I get the below error. But when i access the relevant BI system i am able to access it well , i dont get any RFC Error. Will there any port setting for query designer separately. This is problem faced at offshore which connects to client servers at onsite. Onsite guys are not facing any issues openning query designer or analyser. Please guide as i am not good in basis ..
RFC_ERROR_COMMUNICATION
Message
CMALLC : rc=27 > Connect from SAP gateway to RFC server failed
Connect_PM GWHOST=163.164.XX.XXX, GWSERV=sapgw00, SYSNR=00
LOCATION SAP-Gateway on host XXXXXXX/ sapgw00
ERROR timeout during allocate
TIME Mon Sep 12 14:20:38 201
RELEASE 700
COMPONENT SAP-Gateway
VERSION 2
RC 242
MODULE gwr3cpic.c
LINE 2066
DETAIL no connect of TP sapdp00 from host 163.164.XX.XXX, after 20 sec
Thanks
Vamsi
Edited by: vamsi talluri on Sep 14, 2011 6:57 PMHi Experts,
I have checked with basis team , my issue is resolved, please find the solution .
1) Add corresponding system server names in host files of the offshore desktops.
2) After that basis has added offshore natted ips in sap gatewat parameter/alternate hostnames in system profile (rz10 tcode).
Then offshore are able to access query deisgner etc....
Regards
vamsi -
Can we see value of CKF in exception cell in query designer-please reply
Hello all,
I am defining a query in query designer in which i am using the exception cells, I am having two structures in this query. Now at the intersection of these two structure on one particular line I am trying to define the properties of that cell. I selected new selection and after that I added the calculated key figure that I had created. So should that cell show me the value of the calculated key figure (that is what I thought, that if I can put my CKF in that cell it will show me the value for that CKF). I am seeing different results.
Is there any way you can actually show the value of calculated key figure in that particular cell.
Thanks in advance,
RajHi Raj,
You can add Calculated key figure,RKF and even single key figures .The cells are independent of each other and that should not be an issue.
Whatever the key figure is in the cell it should show that value.
Just check again whether you have put any key figure into the selections of the structures
There should be no key fgures into selctions.
Hope it helps
Thanks
Maybe you are looking for
-
How do I use my SSD for apps and HDD for documents?
Hi, everyone. I just installed (myself) an Intel 120GB SSD into my 2011 iMac (3.4Ghz Quad-Core, 16GB RAM, 1TB HDD). I kept the HDD. I run Logic Pro 9 and have around 200GB of additional sample plugins (VSL Solo Strings, Ivory Grand Pianos, Superior D
-
Database table/FM to find relation between plant and company code in SRM
Hi, I have a requirement where I need to determine the relation between the plant and company code in SRM. The plant and company code both belong to R/3. We are replicating the plant by using the report BBP_LOCATIONS_GET_ALL. This plant is now availa
-
Why is the image cropped?
Perhaps I haven't noticed this before... Because of emminent system failure, I purchased a new PC with Windows7 (upgrade (?) from Windows XP) and then upgraded Photoshop to CS5 from CS3. However, I notice that when I rotate a "landscape image" and m
-
HT4061 Can you download a movie to your ipad if you don't have it with you?
Can you download a movie to your ipad if you don't have it physically with you. I'm going out of town tomorrow and want to download a movie now, but my Ipad is at home.
-
Multiple Unit of Measure in SAP BO
We have a requirement to use multiple unit of measures from one of our client whose business concern is manufacturing and tenneries. We want to measure inventory in units and in meters at same time. For example, if one new unit measuring 50 metres is