Count of Number of Orders in BEX query
Hi,
for Count number of Orders, have created a KF calculated on Order Quantity and then, in property, have inserted in Exception Aggregation the counting of All values of characteristic Sales Document and then on the KF calculated I do an KF restricted on the orders rejected. For order cancelled (Recordmode = R) the calculation it is different if I make a FULL or a FULL and then a delta, according to if the order has more items and only one item annulled or if the order has only one item and then it comes cancelled.
How can I count the orders in these cases?
Many thanks.
Charly
Hi Parth,
following the example of the query:
1) Only document 220062675 with Reverse (cancelled) without drilldown Document
Calendar Year/Month----# Orders AVG--Counter for Orders-----# Orders
05.2011--00--
0
Overall Result--00--
0
2) Only document 220062675 with Reverse (cancelled) with drilldown Document
Calendar Year/Month-----Sales document# Orders AVG--Counter for Orders-----# Orders
05.2011--22006267500--
0
Overall Result--00--
0
With only this document the calculated is good.
3) Two document: 220062675 with Reverse (cancelled) and 220062675 (Normal) without drilldown Document
Calendar Year/Month----# Orders AVG--Counter for Orders-----# Orders
05.2011--11--
2
Overall Result--11--
2
The problem here is that # Orders (Counter for Orders / # Orders AVG) is 2 and not 1.
4) Two document: 220062675 with Reverse (cancelled) and 220062675 (Normal) with drilldown Document
Calendar Year/Month-----Sales document# Orders AVG--Counter for Orders-----# Orders
05.2011--22006267500--
0
05.2011--22006267611--
1
Overall Result--11--
1
In this case, the count of orders is different if drilldown or not.
Charly
Edited by: Charly1 on Jun 2, 2011 4:56 AM
Similar Messages
-
Hi experts,
I have a requirement to make the format of report as under.
Date 1.................. Date 2............. Result
A... B... C ............A... B... C....... .30
Whereas result is area1.a+area2.a. I am putting following fields to column of query designer and in same way.
Date
.. Key Figures
......A
......B
......C
......Result
But the outcome is as under.
Date 1........................... Date 2
A... B... C... Result....... A... B... C.... Result.....Overall Result
I tried to supress the result of date but it wont work. Any idea on how to sort it in right order.
Thanks
RaySo are you looking for both master data and transactional data in the report? If it is just the transactional data you could build a dummy key figure EG: number of rows in the bex and pull into the webi report.
-
Order query by empty position - BEX query
Hi,
We need to order a BEX query by Invoice and Ascending Position (we need to see first the empty position #).
The type of the infoObject "Position" is NUMC (6).
We tried to convert it to char, but it didn't work.
We also ordered the query by position ascending, but the result we obtained is:
Invoice
Position
Material
Quantity
1
1
930100
20
1
2
930200
30
1
50
2
1
930200
70
2
70
3
1
930200
35
3
2
930100
25
3
60
We need to obtain this result:
Invoice
Position
Material
Quantity
1
50
1
1
930100
20
1
2
930200
30
2
70
2
1
930200
70
3
60
3
1
930200
35
3
2
930100
25
Any ideas?
Thanks in advance,
FlorenciaHi Kodanda, we've already tried the ascending order, but we're gettting this order:
nvoice
Position
Material
Quantity
1
1
930100
20
1
2
930200
30
1
50
2
1
930200
70
2
70
3
1
930200
35
3
2
930100
25
3
60
We need to obtain this result:
Invoice
Position
Material
Quantity
1
50
1
1
930100
20
1
2
930200
30
2
70
2
1
930200
70
3
60
3
1
930200
35
3
2
930100
25 -
Custom Hierarchy sub selection from BEx Query to Webi
Hi All,
The client has requested that from a hierarchy only certain accounts / account nodes be brought into the Webi report.
I have made a Account Number Filter in the BEx query containing the nodes that the client has requested. In order to get a hierarchical view, I activated the hierarchy display through BEx and selected the hierarchy the the selection of the nodes came from.
I ran the report through Analyzer and all works - the only nodes that show are the nodes that were filtered on through query designer and all lower nodes below it. It displays as a hierarchy properly.
When running in Webi, I bring in the hierarchy object for Account number and the report crashes giving me the general Webi error. (I have added a screenshot).
In conclusion, what I am trying to do is take a sub selection of certain account nodes from a hierarchy and display those nodes with all lower levels below in a hierarchy. It works in BEx, not in Webi.
If this won't work in Webi, any idea how to build this in BEx so it will work in Webi?I haven't tried this myself yet - but did you register your Google API key? Please see Google Maps in SDK Extension
-
Unable to sequence the prompts as mentioned in Bex Query
Hi,
We are unable to sequence the prompt order in web i report which is build up on Bex query.
We have follwed the prompts order in Bex query,
When we build a web i report the sequence of prompts is not coming as expected, rather its taking in alphabetical order.
Please help us in ordering the sequence of the prompts in Web i.
Thanks in Advance,
Swaraj.Hi,
Part of this other post I just answered, so I'll leave the same info here...
This is a known behavior, but I know it is bugging more people, because the same is true for (normal) universe based prompts.
They also cannot be 'arranged'. Since the Bex query is the 'universe', ordering that has been set in the 'universe' is the only chance you have.
Like with the universe you could use prefixes to separate them from the query defined prompts (based on an alphabetic sort of the prompt message). I'd say this is a good one for the idea place...
(actually it is there, part of this one... [https://cw.sdn.sap.com/cw/ideas/2377])
Vote for it if you want this happening.
Good luck,
Marianne -
Count Rows before Excecution of BEx Query
Hi all,
I would appreciate it if someone could help me in the following matter:
I have a BEx query with a large number of rows / records (sometime about more than 100.000 rows) depending on the selection in the selection screen. I would like to count the number of rows of the selection before excedcuting this query in order to send an error message, so that the user needs to make a new selection with less rows due to the fact that we get short dumps. The problem I have, I cannot find a function module or something else to get the number of the selected rows.
Can anyone help me to solve this????
Best Regards
AbdelHi all,
I have solved the problem. I have modeled a DSO with all data of all my Cubes and wrote a programm in the User-Exit for reporting variables that counts the selected rows before excecuting the query. A warning message is also programed, when the user choses too much rows.
But thank you for triying to help me.
Best Regards
Abdel -
How to manage the same counter based on Order Number and Order Items
Hi All,
we need some help to build an infocube and a query as described in the following scenario.
ODS 1 (Order Numbers aggregated at month level) defined as:
- Order Month
- Customer
- Counter
ODS 2 (Order Items aggregated at month level) defined as:
- Order Month
- Customer
- Product
- Counter
We would like to build an InfoCube that allows us to create a query through which we are able to compare:
- ODS 1 - Counter, that means the number of orders without considering the product
- ODS 2 - Counter, that means the number of orders where a specific product is included
For example:
ODS 1:
Order Month........Customer........Counter
200701...............20001.............10
200701...............20002.............5
ODS 2:
Order Month.............Customer...................Product..........Counter
200701.....................20001.......................A....................1
200701.....................20001.......................B....................10
200701.....................20002.......................A....................4
200701.....................20002.......................C....................5
The desired query should show the following result
Ord Month.Customer..Product.....Counter....Counter
.................................................(ODS2).....(ODS1)
200701......20001.......A..............1..............10
200701......20001.......B..............10.............10
200701......20002.......A..............4..............5
200701......20002.......C..............5..............5
Do you have any idea how to get this result?
Thanks
Kind RegardsHi Valeria,
Have a look,
<a href="http://sapbwneelam.blogspot.com/2007/08/sap-tables.html">How to... Count the occurrences of a characteristic</a>
<a href="http://sapbwneelam.blogspot.com/">More Docs .....</a>
Hope it Helps
Srini -
'COUNT' the number of occurrences of a characteristic in BEx
Good day all.
3.x BEX.
I want to count all the occurrences of a " Claim Number" in a BEx query.
The u201CClaim numberu201D might have several u201Clinesu201D ie : Claim number u201CMMC123u201D has line 1, 2 and 3. I only want to count it as u20181u2019 Dealer claim number, not u20183u2019.
I have a InfoObject "Counter" in DSO and transformation that counts all the lines, not just the claim numbers. If I set the counteru2019s key figure properties (calculate single value as..) to u2018minimumu2019, I will receive the correct quantity of lines when u201Cclaim numberu201D is displayed in the query results. BUT, I only want to display the total in the query (no detail).
If I remove the Dealer claim number from the result, then the total displayed includes all the lines for the claim number as well.
How do I get the correct quantity to display?
Thanks in advance.
CjHi,
Use exception aggregation for Keyfigure (counter) Properties with referce to the char Claim Number.
Goto->Counter(KF)Properties->exception aggregationTab-->select refchar(Claim Number)-->ok.
then u will get aggregation value.
Hope it willhelp.
Regards,
Satya -
BEx query needs to count unique characteristic values
Is there any way to build a query using BEx query designer to count the number of unique values of a characteristic. For instance, my cube has detailed transactions for claim information. Each claim number can have multiple products. My query need to show the number of claims that exist for each product. I don't want the detail of the claim number, just how many claims exist.
Product Gross Paid Loss Claim Count
Total Auto $ 43,865.01 ?
Total Property $ 4,068,321.57 ?
Not assigned 19,426Hi,
Creat calculated keyfigure with data functions Count value and save with technical name.
Right click on that go to propertes, select count with exception aggregation - Claim Number,
also use after aggregation and decimal places '0'.
Regards
Malyadri -
How do I count the number of records returned in the CMIS query
How do I count the number of records returned in the query CMIS?
SELECT COUNT(*) FROM ora:t:IDC:GlobalProfile WHERE ora:p:xRegionDefinition = \'RD_PROJETOS_EXCLUSIVOS\''}
Euler HomeroHi Euler,
interestingly enough, the reference guide for CMIS ( http://wiki.alfresco.com/wiki/CMIS_Query_Language ) that I found does not mention the COUNT function at all. On the other hand it states that: "The SELECT clause identifies which virtual columns to return in the result set. It can be either a comma-separated list of one or more queryNames of properties that are defined by queryable object types or * for all virtual columns."
There are, however, some other posts like e.g. http://alfrescoshare.wordpress.com/2010/01/20/count-the-total-number-of-documents-in-alfresco-using-sql/ which state that they could make it working.
Having asked in the WebCenter Portal forum, I assume that your content repository is WebCenter Content. The CMIS doc for the Content is available here: http://docs.oracle.com/cd/E23943_01/doc.1111/e15813.pdf (no COUNT there either). It does, however, mention explicitly that "CMIS queries return a Result Set where each Entry object will contain only the properties that were specified in the query.". This means your could rather investigate the Result Set. Note that there are also other means than CMIS how to get the requested result set (e.g. calling a search service directly via so-called RIDC).
In the given context I am also interested what your use case is. OOTB CMIS in WebCenter Portal is used, for instance, in Content Presenter, where it is content rather than "parameters" what's displayed. -
BEx Query Columns come back in different Order after drill?
I have a strange effect when I work with BEx Queries in Xcelsius.
On default, I open and display the Bex Query "A". Columns are in order like defined in BEx Designer (Column1, Column2, Column3.....)
I want to do a drill, and so in Xcelsius BEx Connection settings I set the Filter on Field "X" in the XLS and in "Query Usage" I addionally apply the setting "Refresh when Trigger Cell "X" changes".
Starting the report works fine. But when I do the drill and the Query refreshes, the BEx Query Columns come back in different order?!?
It looks as if Column 2 and Column 3 are exchanged.
How can I fix that?
Thx,
B. WegnerAfter some testing....
This issue is independent from the filter value. But it only seems to occure when a second BEx Query connection is defined.
The BEx Query Data Columns come back in different order after
- Refresh on Trigger
- Refresh after XY Seconds
Any Ideas?
Edited by: B.Wegner on Nov 16, 2010 3:42 PM -
Count and Percentile calculations for various Lines in BEx Query.
Dear Experts
I working on a BEx Query at the moment and the output is required in the format below:
This and another report (which will be displayed above this report) will go into a WAD eventually.
I have Key Figure for 'Document Count' but not sure how to get the percentage displayed in the second line and also for the Top 3 Reason Codes (not having anything displayed across 'Top 3 Reason Codes' though). I have tried Selection and other ways but nothing worked so far.
Do I have to use Cell Editing by any chance or is there a way to work-around this.
Thanks in advance for your help.
Kind regards,
ChanduYou can achieve your report format by creating a Structure in rows with Cell definitions. Define each cell in COunt Document KF according to the row logic.
-
CR 8.5, I need to count the number ordered and the number on back order
- - Crystal Reports 8.5 - -
I have two fields.
Qty Shipped and Qty Backordered.
I want to calculate the percentage of orders shipped.
Something like:
Count ({CIT_PT_RO_Fulfillment;1.QtyShip}) > 0
Count ({CIT_PT_RO_Fulfillment;1.QtyBackorder}) > 0
But I know these aren't correct as they return the value of True...
Then I'll take those two fields and calculate the percentage shipped...
Can someone help me with this?
Thanks
KelvinHi Kelvin,
Try this.
Add the count of field1 with field 2, you will get total number of orders.
Then you can write below formula to calculate the percent.
number ordered / total number of orders * 100.
Hope it helps.
Thanks,
Sumit Kanhe -
How to count a number in number using sql query
Hi Guys,
I want to count a number in number.please answer this query.
eg> i have a phone No : 9988585633
Now i want to count a number of this phone no:
if i will give no: 9 then it will return 2
if i will give no: 8 ,tnen it will return 3.
regards,
DhanushSomething like this:
$[CHE_TEST@asterix1_impl] var phoneno char(10);
$[CHE_TEST@asterix1_impl] exec :phoneno := '9988585633';
PL/SQL procedure successfully completed.
$[CHE_TEST@asterix1_impl] ed
Wrote file c:\temp\afiedt.sql
1 with data as (
2 select substr(:phoneno, level, 1) no
3 from dual connect by level <= length(:phoneno)
4 )
5 select count(*), no
6 from data
7* group by no
$[CHE_TEST@asterix1_impl] r
1 with data as (
2 select substr(:phoneno, level, 1) no
3 from dual connect by level <= length(:phoneno)
4 )
5 select count(*), no
6 from data
7* group by no
COUNT(*)|N
----------|-
2|3
1|6
3|8
2|5
2|9cheers -
Count number of colums for that query.
Hi all,
I need to return the number of columns for that query, the columns are not known...dynamic columns.
i.e
1) Example 1
select column1, column2
from dual;
Result should return counter = 2
2) Example 2:
select column1, column2,column3,column4, column5
from dual;
Result should return counter = 5
from dual;
Result should return counter = 2
Thanks.qwestion wrote:
I need to return the number of columns for that query, the columns are not known...dynamic columns.For this you'll need to use the DBMS_SQL package:
e.g.
SQL> ed
Wrote file afiedt.buf
1 CREATE OR REPLACE procedure query_col_count(p_sql IN VARCHAR2) IS
2 c NUMBER;
3 rec_tab DBMS_SQL.DESC_TAB;
4 col_cnt INTEGER;
5 BEGIN
6 c := DBMS_SQL.OPEN_CURSOR;
7 DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE);
8 DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
9 DBMS_SQL.CLOSE_CURSOR(c);
10 DBMS_OUTPUT.PUT_LINE('Number of columns: '||col_cnt);
11* END;
SQL> /
Procedure created.
SQL> exec query_col_count('select empno, ename from emp');
Number of columns: 2
PL/SQL procedure successfully completed.
SQL> exec query_col_count('select * from emp');
Number of columns: 8
PL/SQL procedure successfully completed.
SQL>
Maybe you are looking for
-
IT is so frustrating,because I cannot go further without being connected to iTunes..it's a brand new mini IPad, and I gave the network and then the iTunes thing to press to connect disappeared...HELP!
-
Why is there no fix to this irritating loss of wi-fi I have been having on my macbook?
I have been losing wifi constantly for the past few weeks and have tried everything from changing setting on macbook to changing everything on the router as well. The problem still happens. Loses wifi. I know it is the machine as my ipad and other wi
-
Can GW 2012 Client function as standalone Web Mail client ?
I want to evaluate GW 2012 as an internet mail client, which connects to GMail using POP / SMTP. After installing the GW 2012 client, I start up GW, but it doesn't seem to be able to connect with GMail. It 'hangs' on an info. box which reads either,
-
Approve button missing.
I have the following users with their permissions on a particular forder: author: read/write approver: no permissions, is mentioned as a approver in a single step approval process. Issues: 1. approver does not see the folder nor the document that is
-
Deep Cloning of resultset object
Hi, Is it possinble? Deep Cloning of resultset object? Resltset rs = pstmt.execute() Anyway to assign rs2 = rs1 Because I am passing my resulset to a legacy application's method, that does a rs.close(). I need to use the same resultset later. JDK 1.4