Grouping results by Month
Hello,
I am building a report that is grouping results by Week. So
far the query will pull the data from the database by week. I have
a weekstart date and weekending date in the results. This report
will have Year to date results and I wanted to break the results to
display by Month. How can I achive this?
Thanks for the help!
Hello,
I am building a report that is grouping results by Week. So
far the query will pull the data from the database by week. I have
a weekstart date and weekending date in the results. This report
will have Year to date results and I wanted to break the results to
display by Month. How can I achive this?
Thanks for the help!
Similar Messages
-
How to group each 3 months of a year and dynamic a new column?
I have a sql which can display the belows records.
YEARS MONTHS SUMMONTH SUMYEAR
2009 Apr 130288 1720164
2009 Aug 138776 1720164
2009 Dec 140294 1720164
2009 Feb 136422 1720164
2009 Jan 148253 1720164
2009 Jul 149842 1720164
2009 Jun 122805 1720164
2009 Mar 145872 1720164
2009 May 151193 1720164
2009 Nov 133487 1720164
2009 Oct 169443 1720164
2009 Sep 153489 1720164
2010 Apr 142255 1719457
2010 Aug 135894 1719457
2010 Dec 171203 1719457
2010 Feb 137011 1719457
2010 Jan 145493 1719457
2010 Jul 137474 1719457
2010 Jun 154411 1719457
2010 Mar 133062 1719457
2010 May 146887 1719457
2010 Nov 139869 1719457
2010 Oct 127191 1719457
2010 Sep 148707 1719457
24 rows selected The SQL that I am using:
select years, months, summonth, sumyear
from(
select years, months, SUM (sumHour) OVER (PARTITION BY years,months) sumMonth, SUM (sumHour) OVER (PARTITION BY years) sumyear
from (SELECT x.years, x.months, x.days, x.hours, x.mins, sum(x.value) as sumHour
FROM xmltest,
XMLTABLE ('$d/cdata/name' passing xmldoc as "d"
COLUMNS
years integer path 'year',
months varchar(3) path 'month',
days varchar(2) path 'day',
hours varchar(2) path 'hour',
mins varchar(2) path 'minute',
value float path 'value'
) as X
group by x.years, x.months, x.days, x.hours, x.mins
order by x.years, x.months, x.days
group by years,months,summonth,sumyear
order by yearsand now the problems is...how can I group the sum of 3months of record as a quarter of year in a dynamic column?
The display should be likie this:
YEARS MONTHS SUMMONTH SUMQUARTER SUMYEAR
2009 Feb 136422 430547 1720164
2009 Jan 148253 430547 1720164
2009 Mar 145872 430547 1720164
2009 Apr 130288 404286 1720164
2009 Jun 122805 404286 1720164
2009 May 151193 404286 1720164
2009 Aug 138776 442107 1720164
2009 Jul 149842 442107 1720164
2009 Sep 153489 442107 1720164
2009 Dec 140294 443224 1720164
2009 Nov 133487 443224 1720164
2009 Oct 169443 443224 1720164
2010 Feb 137011 415566 1719457
2010 Jan 145493 415566 1719457
2010 Mar 133062 415566 1719457
2010 Apr 142255 443553 1719457
2010 Jun 154411 443553 1719457
2010 May 146887 443553 1719457
2010 Aug 135894 422075 1719457
2010 Jul 137474 422075 1719457
2010 Sep 148707 422075 1719457
2010 Dec 171203 438263 1719457
2010 Nov 139869 438263 1719457
2010 Oct 127191 438263 1719457
24 rows selected Thanks everyone helps me.!!may be using an outer select :
SQL> with sample_tab as
2 (
3 select 2009 year, 'Aug' month, 138776 summonth , 1720164 sumyear from dual union all
4 select 2009,'Apr',130288, 1720164 from dual union all
5 select 2009,'Dec', 140294 , 1720164 from dual union all
6 select 2009,'Feb', 136422 , 1720164 from dual union all
7 select 2009,'Jan', 148253 , 1720164 from dual union all
8 select 2009,'Jul', 149842 , 1720164 from dual union all
9 select 2009,'Jun', 122805 , 1720164 from dual union all
10 select 2009,'Mar', 145872 , 1720164 from dual union all
11 select 2009,'May', 151193 , 1720164 from dual union all
12 select 2009,'Nov', 133487 , 1720164 from dual union all
13 select 2009,'Oct', 169443 , 1720164 from dual union all
14 select 2009,'Sep', 153489 , 1720164 from dual union all
15 select 2010,'Apr', 142255 , 1719457 from dual union all
16 select 2010,'Aug', 135894 , 1719457 from dual union all
17 select 2010,'Dec', 171203 , 1719457 from dual union all
18 select 2010,'Feb', 137011 , 1719457 from dual union all
19 select 2010,'Jan', 145493 , 1719457 from dual union all
20 select 2010,'Jul', 137474 , 1719457 from dual union all
21 select 2010,'Jun', 154411 , 1719457 from dual union all
22 select 2010,'Mar', 133062 , 1719457 from dual union all
23 select 2010,'May', 146887 , 1719457 from dual union all
24 select 2010,'Nov', 139869 , 1719457 from dual union all
25 select 2010,'Oct', 127191 , 1719457 from dual union all
26 select 2010,'Sep', 148707 , 1719457 from dual
27 )
28 select year,
29 month,
30 summonth,
31 sum(summonth) over(partition by year || to_char(ym, 'Q') order by year || to_char(ym, 'Q')) sumquarter,
32 sumyear
33 from (
34 select year,
35 month,
36 summonth,
37 sumyear,
38 to_date(year || month, 'YYYYMon') ym
39 from sample_tab)
40 order by ym
41 ;
YEAR MONTH SUMMONTH SUMQUARTER SUMYEAR
2009 Jan 148253 430547 1720164
2009 Feb 136422 430547 1720164
2009 Mar 145872 430547 1720164
2009 Apr 130288 404286 1720164
2009 May 151193 404286 1720164
2009 Jun 122805 404286 1720164
2009 Jul 149842 442107 1720164
2009 Aug 138776 442107 1720164
2009 Sep 153489 442107 1720164
2009 Oct 169443 443224 1720164
2009 Nov 133487 443224 1720164
2009 Dec 140294 443224 1720164
2010 Jan 145493 415566 1719457
2010 Feb 137011 415566 1719457
2010 Mar 133062 415566 1719457
2010 Apr 142255 443553 1719457
2010 May 146887 443553 1719457
2010 Jun 154411 443553 1719457
2010 Jul 137474 422075 1719457
2010 Aug 135894 422075 1719457
YEAR MONTH SUMMONTH SUMQUARTER SUMYEAR
2010 Sep 148707 422075 1719457
2010 Oct 127191 438263 1719457
2010 Nov 139869 438263 1719457
2010 Dec 171203 438263 1719457
24 rows selected
SQL> -
How to display text in addition to average group result
Hi All,
This is probably really simple but i need your help.
What i have done:
I have 4 questions which each one has 5 radio box options. For each group of questions, i have put a value of 1-5 for the radio boxes.
What i am trying to do:
What i want to do is calculate the total for the group results as an average and display some additional text. T
The averaging for the group results is working, but i dont know how to add the additional text for the 1-5 values returned.
For example, if the average for all 4 questions turns out to be 3, i want the text box to not only display 3 but state Moderate - 3; or something like 3 - Moderate.
Any help would be greatly appreciated.
Thank you,
GregLike in Excel you need to add some additional code but with JavaScript it is a lot more code. Unless you use a hidden field to hold the computed average, you need to provide all the code to perform the average, that is sum all the fields and divide by the number of fields. Once you have that value you can concatenate the text to the number. Or you could have one text field with the computed average and a second text field with the text. You will also have to deal with the average not always being a whole number. If you change the number of decimal places for your solution, you will see this.
function GetField(cName) {
// get object for field with cName;
// return object or null if not found;
var oField = this.getField(cName);
if(oField == null) app.alert("Field named " +cName + " not found.", 0, 0);
return oField;
} // end GetField function;
function Sum(aNames) {
// get sum of the fields in aNamee array;
var nSum = 0; // sum of fields;
var nValue; // value or a single field;
// process array of field names;
for(i = 0; i < aNames.length; i++) {
var nValue = GetField(aNames[i]).valueAsString;
if(isNaN(nValue) == false) nSum += Number(nValue);
} // get next field name;
return nSum;
} // end Sum function;
function Average(aNames) {
// compute average of the values of array of field names;
var nAverage = "";
var nSum = Sum(aNames); // get sum of field values;
if(aNames.length > 0) nAverage = nSum / aNames.length;
return nAverage;
} // end Average function;
// array of field names to average;
var aFields = new Array("Value.0", "Value.1", "Value.2", "Value.3", "Value.4");
// compute average using the function and place result in a variable;
var nAverage = Average(aFields);
// array of text for value of average;
var aResult = new Array("Zero average", "Poor", "Better", "Mid point", "Better", "Best");
// display computed average and text;
event.value = nAverage + " " + aResult[Math.floor(nAverage)]; -
How to group these values month by month ?
Hi,
I have a nice SQL statement which returns days by days, the values of a device.
WITH S1 AS
(SELECT DATE1,
ROUND(AVG(VALEUR),2) Debit
FROM EVV_E032
WHERE DATE1 BETWEEN TO_DATE('01012006000000', 'DDMMYYYYHH24MISS') AND TO_DATE('31122006235959', 'DDMMYYYYHH24MISS')
AND CLEF_VAR =
(SELECT CLEF_VAR FROM SITE_DEBIT_RIVIERE WHERE SITE = 'E032'
GROUP BY date1
SELECT NULL LINK ,
TO_CHAR(n, 'DD.MM'),
NVL(ROUND(AVG(Debit),2), 0) "Débit"
FROM
(SELECT TRUNC(TRUNC(to_date(2006,'YYYY'),'year'), 'DD')-1 + level n,
rownum jours
FROM dual CONNECT BY level<=366
) days
LEFT JOIN s1
ON days.n = TRUNC(date1,'DD')
GROUP BY n
ORDER BY nSample values :
Insert into "EVV_E032" (DATE1,DEBIT) values (to_date('10/02/2006 09:49:59','DD/MM/YYYY HH24:MI:SS') 1,63);
Insert into "EVV_E032" (DATE1,DEBIT) values (to_date('21/02/2006 10:35:12','DD/MM/YYYY HH24:MI:SS') 1,68);
Insert into "EVV_E032" (DATE1,DEBIT) values (to_date('21/02/2006 11:30:30','DD/MM/YYYY HH24:MI:SS') 0);
Insert into "EVV_E032" (DATE1,DEBIT) values (to_date('23/02/2006 14:02:02','DD/MM/YYYY HH24:MI:SS') 0);
Insert into "EVV_E032" (DATE1,DEBIT) values (to_date('23/02/2006 16:22:34','DD/MM/YYYY HH24:MI:SS') 0);
Insert into "EVV_E032" (DATE1,DEBIT) values (to_date('30/04/2006 18:09:08','DD/MM/YYYY HH24:MI:SS') 1,72);
Insert into "EVV_E032" (DATE1,DEBIT) values (to_date('20/05/2006 11:57:02','DD/MM/YYYY HH24:MI:SS') 1,72);
Insert into "EVV_E032" (DATE1,DEBIT) values (to_date('07/06/2006 15:11:58','DD/MM/YYYY HH24:MI:SS') 1,79);
Insert into "EVV_E032" (DATE1,DEBIT) values (to_date('08/06/2006 20:00:26','DD/MM/YYYY HH24:MI:SS') 1,82);
Insert into "EVV_E032" (DATE1,DEBIT) values (to_date('19/06/2006 09:42:32','DD/MM/YYYY HH24:MI:SS') 1,72);
Insert into "EVV_E032" (DATE1,DEBIT) values (to_date('20/06/2006 04:30:00','DD/MM/YYYY HH24:MI:SS') 1,82);
Insert into "EVV_E032" (DATE1,DEBIT) values (to_date('20/06/2006 10:39:01','DD/MM/YYYY HH24:MI:SS') 1,72);
Insert into "EVV_E032" (DATE1,DEBIT) values (to_date('24/06/2006 19:34:50','DD/MM/YYYY HH24:MI:SS') 1,82);
Insert into "EVV_E032" (DATE1,DEBIT) values (to_date('26/06/2006 14:37:26','DD/MM/YYYY HH24:MI:SS') 1,88);The output are values grouped day by day. I would like to group tehse values month by month, but could not figure how to do. Even though I am not a newbie newbie on SQL, this code is going far too much for me. I know some of you guys can handle this. I tried hard but coud not succeed. Could you help me ?
Regards, Christian.Difficult to work out (read: too much hassle) with your data and sql, as you haven't provided a set of info for all the tables provided, but hopefully this will give you an idea:
with my_tab as (select trunc(sysdate)+30 dt, 1 val from dual union all
select trunc(sysdate) dt, 2 val from dual union all
select trunc(sysdate) dt, 20 val from dual union all
select trunc(sysdate)+30 dt, 10 val from dual union all
select trunc(sysdate)+60 dt, 6 val from dual)
-- end of mockup of table "my_tab"; see SQL below...
select trunc(dt, 'mm') dt, sum(val)
from my_tab
group by trunc(dt, 'mm')
order by trunc(dt, 'mm');
DT SUM(VAL)
01-MAR-09 22
01-APR-09 11
01-MAY-09 6 -
How to span parent group results over child group results
Hey,
I have created a matrix report with 3 groups, for example,
Grade for rows, and age and gender for columns:
-----10---11----12
----M F M F M F
1
2
3
What I am looking to do is make it appear like the age group result is centered above each of the gender group results (both M and F together), appearing to span them both, so for example the 10 will be centered above the M F as above. Right now my 10 only spans as far as needed to hold the result and it looks funny.
Any ideas, and did I explain what I am trying to do ok?Hello,
You can try this... make your age and gender fields of the same length size long enough to accomodate the longest text, then change the alignment of the these columns to center and the horizontal elasticity to fixed.
-Marilyn -
Divide any 12 months into group of 3 months
Hi,
I have a report where in my report fetches previous 12 months data. Previous means previous from current month. So if report is run in Feb-2014 it fetches data from Feb-2013 to Jan-2014.
Now, I need to divide this span of Months into group of 3 months. Like:
02/2013 - 04/2013
05/2013 - 07/2013
08/2013 - 10/2013
11/2013- 01/2014
How can it be achieved.. Any inputs please..
I am working on CR for Enterprise 4
Thanks..If the source wasn't a Universe, here's what you would do:
1) Find out of the Minimum Date from the records returned by the query. To do this, go to the Database Options on the Top > Show SQL Query > Copy. Let's assume the copied sql looks like this:
Select table.date, table.field1, table.field2 from Table where <condition>
2) Go to the Database Expert > Under the Connection Name, click Add Command > Paste the copied SQL and modify that to:
Select Min(table.date) as Minimum from Table where <condition>
2) Go to the Database Expert and make sure these two tables are Not Joined on any field
3) Create a formula with this code:
If Month({Date}) IN
[Month({Command.Minimum}),Month(DateAdd('m',1,{Command.Minimum})),
Month(DateAdd('m',2,{Command.Minimum}))] then 1
else If Month({Date}) IN [Month(DateAdd('m',3,{Command.Minimum})),Month(DateAdd('m',4,{Command.Minimum})),
Month(DateAdd('m',5,{Command.Minimum}))] then 2
else If Month({Date}) IN
[Month(DateAdd('m',6,{Command.Minimum})),Month(DateAdd('m',7,{Command.Minimum})),
Month(DateAdd('m',8,{Command.Minimum}))] then 3
else If Month({Date})
IN
[Month(DateAdd('m',9,{Command.Minimum})),Month(DateAdd('m',10,{Command.Minimum})),
Month(DateAdd('m',11,{Command.Minimum}))] then 4
Replace {Date} with the Date field from the existing table and {Command.Minimum} with the field from the Command Object that we added
4) Go to the Group Expert > Add this formula to the Group list.
That's it!
If you have access to the Universe, you can create a Dimension Object that gets Minimum Date from the query. You can then create another Dimension object using Case Statements that uses the 'Minimum' object to number each row as 1,2,3 or 4. You can then simply group on this new object inside the report.
Hope this helps.
-Abhilash -
Group results of FS10N by VENDOR/month
Is there a way to group and display the results of transaction FS10N (G/L Account Balance Display) by vendor and month?
Is there another transaction that can provide the same information as FS10N and group as requested above?
NicholasHello,
I do no think there are standard reports meeting your requirement.
You can create form using FKI4 - refer FKI5 or FKI6.
Assign this form to report in FKI1 - refer FKI2 or FKI3.
Regards,
Ravi -
Get date by group by per month basis...
Hello all,
I am trying to write a query where i want the count per month...so for example...the below query
select to_char(date, 'MM/DD/YYYY')
from test
where rownum < 10;
TO_CHAR(date
02/10/2009
02/10/2009
02/10/2009
02/10/2009
02/10/2009
05/31/2009
02/10/2009
so i want a count on the date, but want it per month basis....
select count(*), to_char(date, 'MM/DD/YYYY')
from test
where rownum < 10
group by to_char(date, 'MM/DD/YYYY');
so basically end results should be like below
count(*) date
10 Month1
12 Month2
13 Month3Hi,
You're GROUPing BY something that changes from day to day.
You need to GROUP BY something that only changes from month to month, like this:
SELECT COUNT (*)
, TO_CHAR (dt, 'MM/YYYY') -- DATE is not a good column name
FROM test
WHERE ROWNUM < 10
GROUP BY TO_CHAR (dt, 'MM/YYYY')
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and also post the results you want from that data.
Explain, using specific examples where the query above is not doing what you want, how you get the correct results from the data you posted. -
How to create a custom search portlet that groups results by category
Hello,
Is it possible to create a custom search portlet whose search results are displayed on a page grouped by Category? Basically the results page should have Category heading followed by search results.
I realize this is not canned functionality but any ideas on how to accomplish this using PLSQL APIs is also welcome.
Thanks.hi,
one workaround i could think of is using the CM views to search for content that belongs to a category and display it in a custom way.
http://www.oracle.com/technology/products/ias/portal/html/plsqldoc/pldoc904/wwsbr_api_view.html
this only allows you to search for the meta-data available in the CM views but not the content of an item that is available when doing a search.
in the next major portal release we will have a publich search API that can be used for these type of requirements. you can execute your search and format the results in the way you want.
regards,
christian -
Select first and last records in grouped results - Oracle 11g
Say I have the following information in an Oracle 11g table:
Qty
Production order
Date and time
20
00000000000000001
12-JAN-14 00:02
20
00000000000000001
12-JAN-14 00:05
20
00000000000000001
12-JAN-14 00:07
20
00000000000000001
13-JAN-14 00:09
30
00000000000000002
12-JAN-14 00:11
30
00000000000000002
12-JAN-14 00:15
30
00000000000000002
12-JAN-14 00:20
30
00000000000000002
14-JAN-14 00:29
I would like to write a query that would return the following:
Qty
Production order
First
Last
80
00000000000000001
12-JAN-14 00:02
13-JAN-14 00:09
120
00000000000000002
12-JAN-14 00:11
14-JAN-14 00:29
That is, the sum of the Qty column grouped by Production order, and the date/time of the first and last records for each Production order.
I came up with a query that yielded this result:
Qty
Production order
First
Last
80
00000000000000001
12-JAN-14 00:02
14-JAN-14 00:29
120
00000000000000002
12-JAN-14 00:02
14-JAN-14 00:29
Which means that the First and Last columns show the overall first and last date / time of the whole table. Please note that this is a dummy table. Sorry I am now allowed to write the actual query
I came up with since work policies do not allow me to share it. Also, I tried with windowing functions such as rank()and row_number() but my user does not have enough privileges to do so.
Any help or hints will be greatly appreciated.Due to the fact that Oracle does not record the rows in any particular order, it would be wrong that the "first date" would be the first row processed by the query.
Therefore you would have to supply some other column if you do not want to consider the table as ordered by date.
Also, any analytical functions will need you to supply the "order by" and if its the date, then just a simple query will do:
SQL>WITH Tab1 (Qty, Production_Order, Pdate)
2 AS (SELECT 20, '00000000000000001', TO_DATE ( '12-JAN-14 00:02', 'DD-MON-YY HH24:MI') FROM DUAL UNION ALL
3 SELECT 20, '00000000000000001', TO_DATE ( '12-JAN-14 00:05', 'DD-MON-YY HH24:MI') FROM DUAL UNION ALL
4 SELECT 20, '00000000000000001', TO_DATE ( '12-JAN-14 00:07', 'DD-MON-YY HH24:MI') FROM DUAL UNION ALL
5 SELECT 20, '00000000000000001', TO_DATE ( '13-JAN-14 00:09', 'DD-MON-YY HH24:MI') FROM DUAL UNION ALL
6 SELECT 30, '00000000000000002', TO_DATE ( '12-JAN-14 00:11', 'DD-MON-YY HH24:MI') FROM DUAL UNION ALL
7 SELECT 30, '00000000000000002', TO_DATE ( '12-JAN-14 00:15', 'DD-MON-YY HH24:MI') FROM DUAL UNION ALL
8 SELECT 30, '00000000000000002', TO_DATE ( '12-JAN-14 00:20', 'DD-MON-YY HH24:MI') FROM DUAL UNION ALL
9 SELECT 30, '00000000000000002', TO_DATE ( '14-JAN-14 00:29', 'DD-MON-YY HH24:MI') FROM DUAL)
10 SELECT SUM ( Qty), Production_Order, MIN ( Pdate), MAX ( Pdate)
11 FROM Tab1
12 GROUP BY Production_Order
13* ORDER BY Production_Order
SQL> /
SUM(QTY) PRODUCTION_ORDER MIN(PDATE) MAX(PDATE)
80 00000000000000001 12-Jan-2014 00:02:00 13-Jan-2014 00:09:00
120 00000000000000002 12-Jan-2014 00:11:00 14-Jan-2014 00:29:00 -
How to group result set to count values in several (2) attributes?
Hi there,
the (simplified) query at the bottom returns the following result set:
OBJ_ID Attr 1 Attr2
22674886 HAK44221 GEB132542
22674886 HAK44221 GEB92751
22674886 HAK44222 GEB92744
22674886 HAK17113 null
However, we need the number of different Attr 1 and Attr2 counted, which should result in the this:
OBJ_ID Attr 1 Attr2
22674886 3 3
We trried using "group by grouping sets", "group by" and also took a glance at "cube" but didn't manage to get the desired result, mainly due to the fact, that Attr2 may contain null values.
We managed to find a solution using a GTT or a view. Can anybody give a hint how to solve that without using temporary tables?
Best regards
Pat
SELECT
o.obj_id,
o2.obj_name as Attr1,
g.ckw_nis_nummer as Attr2
FROM objekte o
JOIN eigenschaftsdaten d0
ON (o.obj_id = d0.obj_id AND d0.eig_id = 2525755)
LEFT JOIN eigenschaftsdaten d8
ON (d0.egd_wert=substr(d8.egd_wert,1,instr(d8.egd_wert, ' ')-1) and d8.eig_id=2525976)
LEFT JOIN objekte o2
ON o2.obj_id=d8.obj_id
LEFT join gebaeude g
ON o2.obj_id=g.parent_house_serviceHi,
That looks like COUNT (DISTINCT ...):
SELECT o.obj_id
, COUNT (DISTINCT o.obj_name) AS attr1
, COUNT (DISTINCT g.ckw_nis_nummer) AS attr2
FROM objekte o
JOIN eigenschaftsdaten d0 ON o.obj_id = d0.obj_id
AND d0.eig_id = 2525755
LEFT JOIN eigenschaftsdaten d8 ON d0.egd_wert = SUBSTR ( d8.egd_wert
, 1
, INSTR (d8.egd_wert, ' ') - 1
and d8.eig_id=2525976)
LEFT JOIN objekte o2 ON o2.obj_id = d8.obj_id
LEFT JOIN gebaeude g ON o2.obj_id = g.parent_house_service
Depending on your data and your requirements, you may need to join some of the tables separatemly, do a GROUP BY to get attr2, and then join those results to the other tables.
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data. WSimplify the problem as much as possible. For exam[ple, if your real problem involves 5 tables, but the part you don't understand can be shown with only 1 or 2 tables, then post sample data and results for those 1 or 2 tables only.
Point out where the query above is getting the wrong results, and explain, using specific examples, how you get those results from the sample data in those places.
Always say what version of Oracle you're using.
See the forum FAQ {message:id=9360002} -
For some reason, new distribution groups I have created result in Undeliverable with the following body, Other distribution groups created in the past work fine. I have tested this outside our organization using my gmail and it gets returned to my gmail
account as well. Users that belong to the group are chosen obviously from the exchange provided users. I have tried using OWA, deleting autoentry, using the full address of the distribution group, I am truly at a loss. Any help is appreciated thanks in advance!
-Steve
Delivery has failed to these recipients or distribution lists:
[email protected]
The recipient's e-mail address was not found in the recipient's e-mail system. Microsoft Exchange will not try to redeliver this message for you. Please check the e-mail address and try resending this message, or provide the following diagnostic text to your
system administrator.
Sent by Microsoft Exchange Server 2007
Diagnostic information for administrators:
Generating server: akmail.mydomain.COM
[email protected]
#550 5.1.1 RESOLVER.ADR.RecipNotFound; not found ##
Original message headers:
Received: from akmail.mydomain.COM ([::1]) by
AKMAIL.mydomain.COM ([::1]) with mapi; Tue, 8 Jul 2014 12:43:48 -0400
Content-Type: application/ms-tnef; name="winmail.dat"
Content-Transfer-Encoding: binary
From: Steven Anderson <[email protected]>
To: "[email protected]" <[email protected]>
Date: Tue, 8 Jul 2014 12:43:47 -0400
Subject: test2
Thread-Topic: test2
Thread-Index: AQHPmsvJDOvU9vGSLkK1oPeNzIzatw==
Message-ID: <[email protected]>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator: <[email protected]>
MIME-Version: 1.0Thank you very much for your response Akshay, here is the results from the Get-DistributionGroup:
Name DisplayName GroupType P
techsupport techsupport Universal t
info info Universal
i
*CallOut *CallOut Universal _
AKwirelessorder AKwirelessorder Universal A
*AllEmployees *AllEmployees Universal, Secur... _
casstb casstb Universal c
albanytsg albanytsg Universal a
ak911kyalarms ak911kyalarms Universal a
Polk Polk Universal
P
Solatb Solatb Universal S
kytechs kytechs Universal k
AKDISTSolacom AKDISTSolacom Universal A
NEFla NEFla Universal N
RhodeIsland RhodeIsland Universal R
NewYork NewYork Universal N
bradsgroup bradsgroup Universal b
petesgroup petesgroup Universal p
mikesgroup mikesgroup Universal m
test2 test2 Universal, Secur... t
So it does list it, I have 2 domain controllers at the same site one is also hosting the exchange server (we are a small business). I created the distribution group directly on the exchange management console. I will force AD replication, but I have looked
at the structure using ADSIedit and it does list it in the users section which is sort of why I am at a loss on this. Thanks very much for your help, -Steve -
MDX - How to group results to calculate the average
Hi,
I have the following MDX query which selects total unique visits per day between a range of my choosing:
WITH MEMBER [Measures].[MyAvg] AS
Round( AVG(
EXCEPT([Dim Date].[Day Of Week].Members,
{[Dim Date].[Day Of Week].[All].&[1],[Dim Date].[Day Of Week].[All].&[7],[Dim Date].[Day Of Week].[All].UNKNOWNMEMBER}
), [Measures].[UniqueVisitsDay]
), 2)
SELECT { [Measures].[MyAvg] } ON COLUMNS,
NON EMPTY { [Dim Date].[Year Month Date].[PK Date].&[2013-03-01T00:00:00]:[Dim Date].[Year Month Date].[PK Date].&[2013-03-31T00:00:00] } ON ROWS
FROM
[MyCube];
Which gives me the following results:
01/03/2013 634
02/03/2013 16
03/03/2013 19
04/03/2013 698
05/03/2013 704
06/03/2013 692
07/03/2013 774
08/03/2013 755
09/03/2013 9399
10/03/2013 19990
11/03/2013 775
12/03/2013 835
13/03/2013 868
14/03/2013 900
15/03/2013 844
17/03/2013 19
18/03/2013 248
19/03/2013 920
20/03/2013 958
21/03/2013 1092
22/03/2013 798
23/03/2013 21
24/03/2013 10
25/03/2013 731
26/03/2013 770
27/03/2013 537
28/03/2013 300
29/03/2013 28
30/03/2013 8
31/03/2013 4
What I need to do is get the average of this set of results over the month. I am expecting this answer:
1478.233333 (which is total unique hits - 44347 / total rows - 30)
But when I change my MDX code to this:
WITH MEMBER [Measures].[MyAvg] AS
Round( AVG(
EXCEPT([Dim Date].[Day Of Week].Members,
{[Dim Date].[Day Of Week].[All].&[1],[Dim Date].[Day Of Week].[All].&[7],[Dim Date].[Day Of Week].[All].UNKNOWNMEMBER}
), [Measures].[UniqueVisitsDay]
), 2)
SELECT { [Measures].[MyAvg] } ON COLUMNS,
NON EMPTY { [Dim Date].[Year Month].[Mar 2013]:[Dim Date].[Year Month].[Mar 2013] } ON ROWS
FROM
[MyCube];
I get the following result:
MyAvg
Mar 2013 9868
Actual: 9868
Expected: 1478.233333
What am I doing wrong?
Thanks,
RobHi Rob,
In SQL Server Analysis Serviceswe do not have a measure Average aggregation type. Fortunately, we have Sum and Count, and since Average = Sum / Count, we can build our own Average aggregation when we need one. Here is a blog about how to create a average
measure, please refer to the link below.
Average Aggregation in Analysis Services
Regards,
Charlie Liao
TechNet Community Support -
Grouping result set by a column in a query without aggregate function
In the below result set, several columns appear for one table.
col data_Type format a12
col column_name format a10
set lines 100
set pages 50
SELECT table_name, column_name FROM user_tab_cols WHERE char_used = 'B'
AND TABLE_name NOT LIKE 'BIN%' ORDER BY TABLE_NAME;
TABLE_NAME COLUMN_NAM
BONUS JOB
BONUS ENAME
DEPT DNAME
DEPT LOC
EMP JOB
EMP ENAME
EMP_DTL ENAME
EMP_DTL LOC
EMP_DTL CONVN_LOC
MEMBER GENDER
MEMBER TEAM
MEMBER MEMBERTYPE
MEMBER FIRSTNAME
MEMBER LASTNAME
MEMBER PHONE
ORDERS STATUS
SYS_CONFIG CODE_ID
SYS_CONFIG FLAG_A
TOURNAMENT TOURTYPE
TOURNAMENT TOURNAMEI don't want the table_name to repeat for every columns within a table_name group. If i use SQLPLUS's BREAK command, it would
suppress duplicates
break on table_nameand the resultset would look like
TABLE_NAME COLUMN_NAM
BONUS JOB
ENAME
DEPT DNAME
LOC
EMP JOB
ENAME
EMP_DTL ENAME
LOC
CONVN_LOC
MEMBER GENDER
TEAM
MEMBERTYPE
FIRSTNAME
LASTNAME
PHONE
ORDERS STATUS
SYS_CONFIG CODE_ID
FLAG_A
TOURNAMENT TOURTYPE
TOURNAME
TYPE TYPE
X ENAME
Y ENAMEBut how can i do this using oracle SQL?Analytics?
SQL> with t as
2 (
3 select 'A' col1, 100 col2 from dual
4 union all
5 select 'A' col1, 200 col2 from dual
6 union all
7 select 'B' col1, 800 col2 from dual
8 union all
9 select 'B' col1, 400 col2 from dual
10 union all
11 select 'C' col1, 500 col2 from dual
12 )
13 select decode(row_number() over (partition by col1 order by col2), 1, col1, null) col1
14 ,col2
15 from t
16 /
C COL2
A 100.00
200.00
B 400.00
800.00
C 500.00
SQL>Cheers
Sarma. -
Use Variance for Distinct Count of Group Results
Post Author: Judith
CA Forum: Crystal Reports
Hi there,
I am new to CR. I am using CR 2008. I am stuck (every two minutes) and it would be great, if you could help me with this one:
I have a list of people who are talking to each other:A to B, B to A, C to D, D to A etc. Then I wanted to see, who has most friends and I have created Groups to have a Distinct Count on how many people are talking to A, and to B, and to C etc. that worked fine. What I would like to do is to find out is who of these has most people they are talking to. Or even better, what is the variance of the resulting subtotals. Simply using Variance or Maximum doesn't seem to work on the DistinctCount Summary.
I would very much appreciate any help on this.
JudithPost Author: Jagan
CA Forum: Crystal Reports
I understand the issue, I don't understand why you think DistinctCount at two different levels should total up. Consider this sample data:Facility, EmployeeA, 1A, 2B, 1B, 3
Facility A's distinct count => 2Facility B's distinct count => 2Report's distinct count => 3
Use DistinctCount() at the group level and create a formula to sum these counts yourself and print that in the report footer.
Maybe you are looking for
-
Hi all, I am a newbie to adobe livecycle process. I am trying to prepopulate the data like the users info when the form is originated in the workspace. I did use the samples example for form render service but added to variables called first and last
-
I have 1000 requests how can i compress the data?
hi guru's 1. i have 1000 requests is it possible to compress all requests at a time? 2. i have 3years data from 2001 to 2003 i want to see the 2001 and 2002 ? if possible , how can u see can any one give the detailes ?
-
No Gold Bar ( Active X ) // unable to install Flash Player
Problem: - no yellow ribbon for the Adobe website (no gold bar) - installed a program but not seen a "gold bar" Solutions: Please try these solutions IF this will work: ( we still haven't tested this procedure ) Your Internet Explorer is running in w
-
Netcfgtool keeps modifiying network setup
I get this strange error since a few days. When I go to the network control panel in the system prefs, I get a message to the effect that my networks settings have changed. And if I click ok (the only option), this dialog keeps popping up, until I ha
-
when i check updates in n gage it says there is one but the n86 is not listed. Any ideas how to update it? Liam