Historical data and Column Chart
Hello
I am trying to retrive historical data from the repository and show it as a column chart through flex UI Implementation.
My Metric is defined as below and it has two columns defined as KEY columns
<Metric NAME="EnergyConsumptionCost" TYPE="TABLE" USAGE_TYPE="VIEW_COLLECT" FORCE_CACHE="TRUE">
<Display>
<Label NLSID="flex_energyCosumptionCost">Energy Consumption Cost Metric</Label>
</Display>
<TableDescriptor>
<ColumnDescriptor NAME="DeviceID" TYPE="STRING" IS_KEY="FALSE">
<Display>
<Label NLSID="flex_DeviceID">Device ID</Label>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="DeviceName" TYPE="STRING" IS_KEY="TRUE">
<Display>
<Label NLSID="flex_deviceName">Device Name</Label>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="EnergyCost" TYPE="NUMBER" IS_KEY="FALSE">
<Display>
<Label NLSID="flex_EnergyCost">Energy Cost</Label>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="CurrencySymbol" TYPE="STRING" IS_KEY="FALSE">
<Display>
<Label NLSID="flex_Currency">Currency</Label>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="EnergyConsumption" TYPE="NUMBER" IS_KEY="FALSE">
<Display>
<Label NLSID="flex_energyConsumption">Energy Consumption</Label>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="Unit" TYPE="STRING" IS_KEY="FALSE">
<Display>
<Label NLSID="flex_Unit">Unit</Label>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="PerUnitRate" TYPE="NUMBER" IS_KEY="FALSE">
<Display>
<Label NLSID="flex_PerUnitRate">Unit Rate</Label>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="DateCollected" TYPE="STRING" IS_KEY="TRUE">
<Display>
<Label NLSID="flex_DateCollected">Metric Collection Date</Label>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="ExtraDetails" TYPE="STRING" IS_KEY="FALSE">
<Display>
<Label NLSID="flex_extraDetails">Extra Details</Label>
</Display>
</ColumnDescriptor>
</TableDescriptor>
<QueryDescriptor FETCHLET_ID="OSLineToken">
<Property NAME="scriptsDir" SCOPE="SYSTEMGLOBAL">scriptsDir</Property>
<Property NAME="classpath" SCOPE="GLOBAL">$CLASSPATH:%scriptsDir%/EnergyDashboardEjbBeanService-Client.jar</Property>
<Property NAME="command" SCOPE="GLOBAL">java -cp %classpath% com.avocent.trellis.oem.plugin.energy.insight.proxy.EnergyDashboardEjbBeanServicePortClient GraphRequest %DeviceID% %StartDate% %EndDate% </Property>
<Property NAME="startsWith" SCOPE="GLOBAL">ext_result=</Property>
<Property NAME="delimiter" SCOPE="GLOBAL">|</Property>
</QueryDescriptor>
</Metric>
I am implement the UI now using flex programming and below is the code of my page contoller class
public class emersontrellisflexHomePageController extends ActivityController
private var page:emersontrellisflexHomePage;
[Bindable]
public var metricDataArrayCollection:ArrayCollection;
public function emersontrellisflexHomePageController()
override public function init(pg:IActivity):void
super.init(pg);
page = pg as emersontrellisflexHomePage;
// get EnergyConsumptionCost metric to get energy consumption cost information
var procMetric:Metric = ApplicationContext.getTargetContext().getMetric("EnergyConsumptionCost");
var procSelector:MetricSelector = procMetric.getSelector(['DeviceID', 'DeviceName','EnergyCost','CurrencySymbol','EnergyConsumption','Unit','PerUnitRate','DateCollected','ExtraDetails']);
procSelector.getData(energyConsumptionCostHandler, MetricCollectionTimePeriod.CURRENT, page.getBatchRequest());
// structure of the data is as follows:
// MetricResultSet -- contains an Array (results) of all the datapoints. If the
// time period is LAST_* then this will be multiple datapoints for each timestamp.
// results[] -- each row in results is a TimestampMetricData datapoint.
// TimestampMetricData -- a datapoint that includes a timestamp and then a table (data) of
// data for all keys included in the sample. If the metric does not have any keys
// then the table will only have a single row.
// data -- the data table, each row is a KeyMetricData object
// KeyMetricData -- the data row, it includes a MetricKeyValue (metricKey) that
// identifies the key associated with that row (if there is one). All other
// data is available via a direct reference by column name, e.g. data[n]['ColumnId']
public function energyConsumptionCostHandler(procResult:MetricResultSet, fault:ServiceFault):void
if(fault != null)
MpLog.logError(fault, "Get Processes");
return;
if(procResult!=null)
var dataLength:int = 0;
var dp:TimestampMetricData = procResult.results[0];
if(dp != null)
dataLength = dp.data.length;
var metricData:EcecObject ;
var data:KeyMetricData;
metricDataArrayCollection= new ArrayCollection();
for(var i:int=0; i<dataLength; i++)
data= dp.data;
Alert.show("Data["+i+"]="+dp.data[i].toString());
metricData= new EcecObject();
metricData.deviceID=dp.data[i]['DeviceID'];
metricData.deviceName=dp.data[i]['DeviceName'];
metricData.energyCost=dp.data[i]['EnergyCost'];
metricData.currencySymbol=dp.data[i]['CurrencySymbol'];
metricData.energyConsumption=dp.data[i]['EnergyConsumption'];
metricData.unit=dp.data[i]['Unit'];
metricData.perUnitRate=dp.data[i]['PerUnitRate'];
metricData.dateCollected=dp.data[i]['DateCollected'];
metricData.extraDetails=dp.data[i]['ExtraDetails'];
metricDataArrayCollection.addItem(metricData);
page.setModel("metricDataCollection",metricDataArrayCollection);
} //End of function energyConsumptionCostHandler
} //End of class
In the handler code I am populating the ArrayCollection with the objects of class "EcecObject" which is defined by me and looks as below
package mpcui
[Bindable]
public class EcecObject
public function EcecObject()
public var deviceID:String;
public var deviceName:String;
public var energyCost:Number;
public var currencySymbol:String;
public var energyConsumption:Number;
public var unit:String;
public var perUnitRate:Number;
public var dateCollected:String;
public var extraDetails:String;
public function toString():String
// TODO Auto Generated method stub
var result:String= "DeviceId="+deviceID+" DeviceName="+deviceName+" EnergyCost="+energyCost+" CurrencySymbol="+currencySymbol+" EnergyComsumption="+energyConsumption+" Unit="+unit+" unitRate="+this.perUnitRate+" dateCollected="+dateCollected+" ExtraDetails="+extraDetails;
return result;
Sample below shows the data populated in the object of type "EcecObject"
(mx.collections::ArrayCollection)#0
filterFunction = (null)
length = 15
list = (mx.collections::ArrayList)#1
length = 15
source = (Array)#2
[0] (mpcui::EcecObject)#3
currencySymbol = ".25"
dateCollected = (null)
deviceID = "KWH"
deviceName = (null)
energyConsumption = NaN
energyCost = NaN
extraDetails = "d6ffcc59-ec5a-424d-a950-dcf3944059c9"
perUnitRate = NaN
unit = "Dollar"
So if we see in the attribute "currencySymbol" the "perUnitRate" is poulated even if my handler code has the following statement
metricData.currencySymbol=dp.data[i]['CurrencySymbol'];
Want to know why the data is swaped in most of the cases. Any correction to be done in the handler code.
Appreciate your help.
Regards
Anand.
The design depends on how much data you are having. If you have lot of data its better to use them separately.
When you create a cube you load historical data from source systems through a full load and later you will be doing delta loads to process new records.
As for as the data is conccerned a cube can contain both historical and transaction data.
Similar Messages
-
Display last 12 months data in column chart
Hi All,
I have one dashbord requirement in list box i have (example:): "oct-11" i need to display previous 12 mnth data in column chart anybody help in excel formula how to display last 12 mnths based on list box selection.
example: if i select oct-11 from list box i need to display in chart like
nov-10 dec-10 nov-10...................................oct-11
please provide how to write in logic in excelHi Shankar,
Try this formula in excel : DATE(YEAR(A1),MONTH(A1)-1,DAY(A1))
A1 will be your cell which is the destination of your List box. & then drag it till 12 months.
If you are not having day from your list box then manually enter 1 in any cell and map that cell in place of A1 for day.
HTH.
Neeraj.. -
iam not able to insert data into datagrid corresponding to the column names..as iam inserting both data and column names programatically..ie iam not able to co relate the data with the column names.plzzz help me asap
A DataGrid is row-based rather than cell-based with each row
corresponding to an item in an underlying collection (specified in the
dataProvider property). In order to add data to a DataGrid you
manipulate the underlying collection, rather than the grid directly.
Based on the limited description of your problem I would imagine you
would need to create dynamic objects with property names that correspond
to the dataFields of your dynamically created datagrid columns.
So if you had created columns with dataFields "alpha", "beta" and
"gamma" on your datagrid, you could create an item in your grid by
adding the following object to your dataProvider:
var gridItem : Object = new Object();
gridItem.alpha = "alphaValue";
gridItem.beta = "betaValue";
gridItem.gamma = "gammaValue"; -
Colour by series in combination and column charts
I am trying to create combination charts and column charts where each column or line in the charts can be assigned its own colour. This can be acheived by using the "By Series" option in the properties "General" tab. However, when this approach is taken, all the columns are grouped in the middle of the chart, with large ammounts of unused space on the left and right of the columns. Usual behavior with other charting programs is that the columns start from the left hand margin. Indeed, this is the case if I choose the "By Range" option, but then all the columns are the same coluor, and individual column and line colours can not be changed. Anybody got any ideas on how to resolve this please.
Hi Darrell,
Here's an example using COUNTIF. I've moved the count to a separate table. Table names are shown above each table:
Formula:
Summary::B2, and filled down to B6: =COUNTIF(Main :: $A,"<"&A3)-COUNTIF(Main :: $A,"<"&A2)
Note that A7 must contain a numberlrger than the starting number for the last category you are recording.
B7 should be left empty.
Row 1 on each table is a Header Row.
Regards,
Barry -
How to scale data in column chart?
Hi,
I have a column chart who's data ranges from 638 to 4,263,000. Due to this extreme range, the lower valued columns are hardly visible
Is there a way by which I can scale up the lower values or scale down the higher values, ultimately resulting in a chart with visible columns to the naked eye. Here's the screen shot for your reference:
(Click on the image to enlarge)
Appreciate you help...
-DeepakHello,
Thank you so much for that hint That one prompted me to use a PlotSeries instead of a ColumnSeries. And PlotSeries clearly shows up all the items, irrespective of how low or how high the value is. Looking at it, the user can drill down further, by clicking on that item.
Screenshot:
-Deepak -
How to position x-axis dates in column chart
I have a column chart (see below) which can have one or more series where the x-axis of the series is a date common to each series. How can I get the date label to appear in the center of each group of columns? In the case shown
here, the date label would be exactly where the blue and yellow columns touch, but if there were just one column group it should appear below the center of each column, or if there were three series, it should appear in the center of the middle column,
and so on.Hello,
I have a problem similar like this. as
already comes the positioning of the
date in the middle.
But now with Format
(double), notindateformat ("dd/
MM/YYYY").
What
can I do to have
the Format Date on my Axis X?I use
the following function
foreach (DataPoint point in series1.Points)
//DateTime mydate = DateTime.FromOADate(point);
area1.AxisX.CustomLabels.Add(new CustomLabel(point.XValue - 1, point.XValue + 1, point.XValue.ToString(), 0, LabelMarkStyle.None));
//area1.AxisX.CustomLabels.Add(new CustomLabel(point.XValue - 1, point.XValue + 1, point.XValue.ToShortDateString(), 0, LabelMarkStyle.None));
thank you
for your help -
What is the difference between bar and column charts
To me they are the same. When should I use one of the two,
but another?"glen08" <[email protected]> wrote in
message
news:ghvjov$sgi$[email protected]..
> To me they are the same. When should I use one of the
two, but another?
One faces east-west, the other north-south.
HTH;
Amy -
Little help with complex XML data as data provider for chart and adg
Hi all,
I've been trying to think through a problem and Im hoping for
a little help. Here's the scenario:
I have complex nested XML data that is wrapped by subsequent
groupings for efficiency, but I need to determine if each inner
item belongs in the data collection for view in a data grid and
charts.
I've posted an example at the bottom.
So the goal here is to first be able to select a single
inspector and then chart out their reports. I can get the data to
filter from the XMLListCollection using a filter on the first layer
(ie the name of the inspector) but then can't get a filter to go
deeper into the structure in order to determine if the individual
item should be contained inside the collection. In other words, I
want to filter by inspector, then time and then tag name in order
to be able to use this data as the basis for individual series
inside my advanced data grid and column chart.
I've made it work with creating a new collection and then
looping through each time there is a change to the original
collection and updating the new collection, but that just feels so
bloated and inefficient. The user is going to have some buttons to
allow them to change their view. I'm wondering if there is a
cleaner way to approach this? I even tried chaining filter
functions together, but that didn't work cause the collection is
reset whenever the .refresh() is called.
If anyone has experience in efficiently dealing with complex
XML for charting purposes and tabular display purposes, I would
greatly appreciate your assistance. I know I can get this to work
with a bunch of overhead, but I'm seeking something elegant.
Thank you.Hi,
Please use the code similar to below:
SELECT * FROM DO_NOT_LOAD INTO TABLE IT_DO_NOT_LOAD.
SORT IT_DO_NOT_LOAD by WBS_Key.
IF SOURCE_PACKAGE IS NOT INITIAL.
IT_SOURCE_PACKAGE[] = SOURCE_PACKAGE[].
LOOP AT IT_SOURCE_PACKAGE INTO WA_SOURCE_PACKAGE.
V_SYTABIX = SY-TABIX.
READ TABLE IT_DO_NOT_LOAD into WA_DO_NOT_LOAD
WITH KEY WBS_Key = WA_SOURCE_PACKAGE-WBS_Key
BINARY SEARCH.
IF SY-SUBRC = 0.
IF ( WA_DO_NOT_LOAD-WBS_EXT = 'A' or WA_DO_NOT_LOAD-WBS_EXT = 'B' )
DELETE IT_SOURCE_PACKAGE INDEX V_SYTABIX.
ENDIF.
ENDIF.
ENDLOOP.
SOURCE_PACKAGE[] = IT_SOURCE_PACKAGE[].
ENDIF.
-Vikram -
Folks,
In my report there are columns where different amounts are populated wrt different value types.
Now i have some historical data and i want those values to be populated in the amount columns.
Any advise would be helpful.
ThanksHi,
If you are using RKF for amount calculation then check the RKF definition, if you can put the selection values related to historical data then the relevant data calculation will be done at key figure level itself.
But the key figure value calculation are done at the time of data load then you will have to reload specific data so as to get the particular key figure value.
Regards,
Durgesh. -
Column Chart with Multiple axes
Hi folks
I am using flex 2 charts for displaying data. I want to show my data using column chart with secondary axis. However columns for multiple series are coming one over another. here is the code I have attached:-
But I want to put columns side by side. Any thoughts will be appreciated.
Warm Regards
Rush-meAny thoughts?
Warm Regards
Rush-me -
Clearing all historical data from the graphs
Hi all,
Now that I have upgraded to 4.1.1c I want to clear all historical data and start from scratch with the graphs/stats/reporting. Is there a way to do such a thing? Could not find anything in the docs other than "clear statistics all" which seems unrelated.
Thanks
Adrianhttp://www.cisco.com/en/US/docs/app_ntwk_services/waas/waas/v411/configuration/guide/monitor.html#wp1043484
Enclosed is the report montioring and configuring guide.
The clear statistics command clears all statistical counters from the parameters given. Use this command to monitor fresh statistical data for some or all features without losing cached objects or configurations. -
Hi I'm having a problem formatting a spreadsheet.
My spreadsheet has 10 columns and two of these are renewal date and price.
I need to format the spreadsheet so that any date before 30 September goes red; before 31 October - another colour; before 30 November - another colour and by 31 December - another colour.
Additionally, I need the spreadsheet to organise from the highest price.
Ideally it should end up that the earliest and highest price renewal should be at the top and the bottom should be the latest and lowest price (at the end of December).
Please can someone help (in simple terms as possible) as to how to do this!
Many thanks,
H.Hi,
According to your description, we need to assign two different conditional formatting rules with column date and column price. Please see the below image:
===
Column Date Rule:
Format only cells that contain> Cell value less than 2014/9/1> Set format red
Format only cells that contain> Cell value between 2014/9/1 and 2014/10/1> Set format yellow
Create multiple rule based on your date.
===
Column Price Rule:
Format only top or bottom ranked values.
Regards,
George Zhao
TechNet Community Support
It's recommended to download and install
Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
programs. -
MP31 - no historical data - how to generate?
Hi specialists,
Mi problem: I have several materials, for which I cannot execute a forecast, because there is "no historical data". The material is very old and there was for sure consumption on it in the past, but before this material was never under MRP.
Is there a way to generate this historical data automatically, maybe even in mass? or do I really have to do that manually material by material?
Any help is appreciated.
Tnx a lot
KurtHi Kurt,
Historical consumption data gathering in the system is not dependent on the material being MRP or not, but on the definitions per movement type, and maintenance of period in one of the plant level views of material master.
I don't know of any procedure in standard SAP that will "rebuild" consumption data. Neverheless, you can always enter your "corrected" historical data, and it will be used by the system for forecasting.
You can do it manually for each material, or upload it from an external file. -
Correct historical data in Infocube
Hi,
We have a infocube which stores data on basis of Reporting division (EUROPE) and Subsidaries (Germany, France, Great Britain etc.).
Now i have a situation where in i need to add new Reporting division (GB) to this cube so that users can see reports with Reporting Division (Europe)and its subsidaries and Reporting division (GB) with its subsidaries.
Can any one please help me on how can i correct historical data and data that will flow from now on so as to make this possible in this cube.
Help will be really appriciated with maximum points.hi,
first take the backup of the cube content.
then chose the cube, right click additional functions - remodelling.
then it opts for remodel rule name give the name and execute and then select it choose whether you have to add/delete/modify the char/keyfigure.
then if you add char/kf specify how/from where the historical datd is to come.
then execute the rule.
http://help.sap.com/saphelp_nw04s/helpdata/en/a4/1be541f321c717e10000000a155106/frameset.htm
Ramesh
Edited by: ramesh kumar on Mar 18, 2008 6:05 AM -
the same with the following description from another question:
"How can I display a total on top of each column on a stacked column chart (using
reporting services 2008)? If I use Data Labels I can display the
values for each part of the stack on a stacked column, but I want to be display the total.
For Example: If I have stacked column on chart with a value of 10 for the 1st stack, 20 for the 2nd stack,
and 20 again for the 3rd stack - I want to display 50 (the SUM total) as the data label on top of the entire column..."
and a solution for this would create a new column named SUM(category group), this can be done with data source from SQL server, but my data is from SharePoint site list. its query seems can't be changed which means I can't add a SUM column.
what should I do with this? Can anyone give me a hand?
thank you very much.Hi sophiexu,
If we want to display a total for each column on the top of a stacked chart, we can use a matrix control to display the column total value to work around this issue.
The following thread about how to simulate chart legend is for your reference:
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/cfb4fa19-b2ba-426a-804b-b5ea83d70d62/ssrs-2008-chart-legend-missing-customitems-property
Hope this helps.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support
Maybe you are looking for
-
My Laptop giving me Unmountable_boot_volume blue screen.
I need Windows XP CD to repair, it didnt come with one, what do I do? whenver windows starts loading it gives me the blue screen, I can't even get to the log in screen. So I can't copy anything inside t windows file or anything. And I dont have the
-
Can i use Two DSO 's in Function module
hi experts, Can i use Two DSO 's in Function module .That FM is used for Layout I actually want to fill one DSO Refering the Data in Another DSO. Regard Naresh.
-
Hi, I used this query for copy user setting from Manager to all other users. This query running successfully but problem is this all the setting is copied but manager user lost all settings i.e all udf's come under general category which is previ
-
Cant find bundles for base name for WD Component
Some of my web dynpro components are throwing this exception: <b>java.util.MissingResourceException: Cant find bundle for base name com/company/application/WoBaseView.wdview, locale en</b> When looking under the src > packages > com > company > appli
-
Why can I not download previously bought music directly to iOS7
hello! Will keep it short, but in the Music App in iOS7 there is a tab where One could view "previous purchases". When i click it, it tels me I don't have any purchased movies to download.... Why can't it just check my previously downøoaded music as