Get current value of the voltage of an AO channel
Hello,
Is it possible to query the state of an AO channel? I would like to know what the current value of the voltage is, but can't seem to find a way to do it.
Thank you
Anyone fond a way to do this?
Please remember to accept any solutions and give kudos, Thanks
LV 8.6.1, LV2010,LV2011SP1, FPGA, Win7
Similar Messages
-
How can I get null values for the later weeks
Hi All,
When I execute this code I get the records till current week.
How can I display the output so that I get null values for the later weeks. (with the help of v_numOfWeeks variable in the code)
Thanks,
Vikram
DECLARE
v_query VARCHAR2(4000);
TYPE ref_cursor IS REF CURSOR;
v_refcur ref_cursor;
v_sum NUMBER;
v_id NUMBER;
v_name VARCHAR2(1000);
v_weeknum NUMBER;
v_pernum NUMBER;
v_numOfWeeks NUMBER := 5;
BEGIN
v_query := ' SELECT SUM(product_bkg), postn_id, postn_tbl.postn_name, b.week_num, b.period_num
FROM ops_cv_extract b, (SELECT row_id, desc_text postn_name
FROM s_postn) postn_tbl
WHERE lvl_6_id = 5767
AND fiscal_year = 2008
AND b.week_num < 4
AND b.period_num = 3
AND b.postn_id = TO_NUMBER(postn_tbl.row_id)
GROUP BY postn_id, postn_tbl.postn_name, b.week_num, b.period_num
ORDER BY postn_tbl.postn_name, b.week_num';
OPEN v_refcur FOR v_query;
LOOP
FETCH v_refcur INTO v_sum, v_id, v_name, v_weeknum, v_pernum;
EXIT WHEN v_refcur%notfound;
dbms_output.put_line('P'|| v_pernum||'W'|| v_weeknum||' '||v_name||' '||v_sum);
END LOOP;
END;
This is the output when I execute this code.
P3W1 COMM CNTRL ISAM 213 26961.61
P3W2 COMM CNTRL ISAM 213 12870.4
P3W3 COMM CNTRL ISAM 213 245.88
P3W1 COMM CNTRL ISAM 273 72831.2
P3W2 COMM CNTRL ISAM 273 8739.38
P3W3 COMM CNTRL ISAM 273 3764.92
P3W1 COMM CNTRL TAM 213 49844
P3W2 COMM CNTRL TAM 213 20515.17
P3W3 COMM CNTRL TAM 213 16167.46
P3W2 COMM CNTRL TAM 216 12561.4
P3W3 COMM CNTRL TAM 216 2027.1
P3W1 COMM CNTRL TAM 273 -3336.71
P3W2 COMM CNTRL TAM 273 -1376.68
P3W3 COMM CNTRL TAM 273 19707.42
P3W1 Damon Walters -609.07
P3W2 Damon Walters 30030.24
P3W3 Damon Walters 37475.1
This is the output I'd like to get
P3W1 COMM CNTRL ISAM 213 26961.61
P3W2 COMM CNTRL ISAM 213 12870.4
P3W3 COMM CNTRL ISAM 213 245.88
P3W4 COMM CNTRL ISAM 213
P3W5 COMM CNTRL ISAM 213
P3W1 COMM CNTRL ISAM 273 72831.2
P3W2 COMM CNTRL ISAM 273 8739.38
P3W3 COMM CNTRL ISAM 273 3764.92
P3W4 COMM CNTRL ISAM 273
P3W5 COMM CNTRL ISAM 273
P3W1 COMM CNTRL TAM 213 49844
P3W2 COMM CNTRL TAM 213 20515.17
P3W3 COMM CNTRL TAM 213 16167.46
P3W4 COMM CNTRL TAM 213
P3W5 COMM CNTRL TAM 213
P3W1 COMM CNTRL TAM 273 -3336.71
P3W2 COMM CNTRL TAM 273 -1376.68
P3W3 COMM CNTRL TAM 273 19707.42
P3W4 COMM CNTRL TAM 273
P3W5 COMM CNTRL TAM 273
P3W1 Damon Walters -609.07
P3W2 Damon Walters 30030.24
P3W3 Damon Walters 37475.1
P3W4 Damon Walters
P3W5 Damon Walters Edited by: polasa on Oct 28, 2008 6:42 PMSure, in a Single SQL ->
satyaki>
satyaki>select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
Elapsed: 00:00:00.01
satyaki>
satyaki>
satyaki>-- Start Of Test Data --
satyaki>with week_tab
2 as
3 (
4 select 1 period_num, 1 week_num, 10 bkg1 from dual
5 union all
6 select 1, 2, 40 from dual
7 union all
8 select 1, 3, 30 from dual
9 union all
10 select 1, 2, 20 from dual
11 union all
12 select 1, 1, 10 from dual
13 union all
14 select 1, 1, 20 from dual
15 union all
16 select 1, 3, 10 from dual
17 union all
18 select 2, 1, 15 from dual
19 union all
20 select 2, 2, 20 from dual
21 union all
22 select 2, 3, 10 from dual
23 union all
24 select 2, 1, 15 from dual
25 union all
26 select 2, 2, 30 from dual
27 union all
28 select 2, 3, 20 from dual
29 )
30 -- End Of Test Data --
31 select period_num,
32 week_num,
33 (
34 select sum(week_tab.bkg1)
35 from week_tab
36 where period_num = m.period_num
37 and week_num = m.week_num
38 group by week_num, period_num
39 ) sum_bkg1
40 from (
41 select dum.week_num,
42 wk.period_num
43 from (
44 select 1 week_num from dual
45 union all
46 select 2 from dual
47 union all
48 select 3 from dual
49 union all
50 select 4 from dual
51 union all
52 select 5 from dual
53 ) dum ,
54 (
55 select distinct period_num
56 from week_tab
57 ) wk
58 ) m;
PERIOD_NUM WEEK_NUM SUM_BKG1
1 1 40
1 2 60
1 3 40
1 4
1 5
2 1 30
2 2 50
2 3 30
2 4
2 5
10 rows selected.
Elapsed: 00:00:00.48
satyaki>Regards.
Satyaki De. -
How to get a value from the previous element (XSLT/XPATH gurus ahoy!)
Hi All,
I am building an RTF template for a "letter of reference"-report. Sometimes there are several rows in the data, that need to be printed as one. This is due to consecutive temporary contracts, which will be printed out as one period of service.
Here's a simplified data example to illustrate the problem.
<ROW>
<START_DATE>01-01-1980</START_DATE>
<END_DATE>01-01-1988</END_DATE>
</ROW>
<ROW>
<START_DATE>01-01-1988</START_DATE>
<END_DATE>01-01-1990</END_DATE>
</ROW>
<ROW>
<START_DATE>01-01-2000</START_DATE>
<END_DATE>01-01-2005</END_DATE>
</ROW>
With the data above, I should print two lines:
01-01-1980 - 01-01-1990
01-01-2000 - 01-01-2005
I need to compare START_DATE of an element (except for the first one) with the END_DATE of the previous element, to find out whether to print the END_DATE for that element or not. How can I get that value from the previous element?
Thanks & Regards, Matildause this to get the following End_date
<?following-sibling::../END_DATE?>
Try this
<?for-each:/ROOT/ROW?>
==================
Current StartDate <?START_DATE?>
Current End Date <?END_DATE?>
Next Start Date <?following-sibling::ROW/END_DATE?>
Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
================
<?end for-each?>
o/p
==================
Current StartDate 01-01-1980
Current End Date 01-01-1988
Next Start Date 01-01-1990
Previous End Date
================
==================
Current StartDate 01-01-1988
Current End Date 01-01-1990
Next Start Date 01-01-2005
Previous End Date 01-01-1988
================
==================
Current StartDate 01-01-2000
Current End Date 01-01-2005
Next Start Date
Previous End Date 01 -
How to get maximal value from the data/class for show in Map legend
I make WAD report that using Map Web Item.
I devide to four (4) classes for legend (Generate_Breaks).
I want to change default value for the class by javascript and for this,
I need to get maximal value from the class.
How to get maximal value from the data/class.
please give me solution for my problem.
Many Thx
Eddy Utomouse this to get the following End_date
<?following-sibling::../END_DATE?>
Try this
<?for-each:/ROOT/ROW?>
==================
Current StartDate <?START_DATE?>
Current End Date <?END_DATE?>
Next Start Date <?following-sibling::ROW/END_DATE?>
Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
================
<?end for-each?>
o/p
==================
Current StartDate 01-01-1980
Current End Date 01-01-1988
Next Start Date 01-01-1990
Previous End Date
================
==================
Current StartDate 01-01-1988
Current End Date 01-01-1990
Next Start Date 01-01-2005
Previous End Date 01-01-1988
================
==================
Current StartDate 01-01-2000
Current End Date 01-01-2005
Next Start Date
Previous End Date 01 -
JUCtrlListBinding -- get current value of list
Hi.
(Jdev 11,1,2 win7.)
I saw a staff code in "Oracle Fusion Developer Guide" book for get current value of listItem as below :
import oracle.adf.model.BindingContext;
import oracle.binding.BindingContainer;
import oracle.jbo.uicli.binding.JUControlBinding;
import oracle.jbo.domain.Number;
import oracle.jbo.server.ViewRowImpl;
BindingContext bindingCtx = BindingContext.getCurrent();
BindingContainer bindings = bindingCtx.getCurrentBindingsEntry();
JUControlBinding listBinding = null;
listBinding = (JUControlBinding)bindings.get("JobId");
ViewRowImpl selectedListRow = null;
selectedListRow = (ViewRowImpl)*listBinding.getSelectedValue()*; :(
String jobIdValue = (String)selectedListRow.getAttribute("JobId");
Number maxSalary = (Number)selectedListRow.getAttribute("MaxSalary");
but Jdeveloper cannot find method getSelectedValue() for listBinding .
help me please to understand correct method .!
thanksDeclare the type of <tt>listBinding</tt> variable as <tt>JUCtrlListBinding</tt> instead of <tt>JUControlBinding</tt>. The base class JUControlBinding does not contain a method getSelectedValue(), this method is defined in the subclass JUCtrlListBinding.
Dimitar -
Comparing the current value with the previous one in Powershell
Hi,
New to scripting and i was wondering how can I compare the current value with the previous value?
I am having trouble with the loop structure, and I am not sure I am on the right track...
I am trying to compare the record to next record in the same csv file after import-csv... My code runs fine, but is not giving the right result.
$FilePath = Get-FileName -initialDirectory "C:\"
#Testing for null
If($FilePath)
$Data = Import-csv -Path $FilePath | Sort-Object BUYER, {[int] $_.PO_NBR}, {[int] $_.LINE_NBR}
Foreach($fData in $Data)
$i = $fData
Foreach($i in $fData)
if($fData.Buyer -eq $i.Buyer)
#save all the same buyer name to a new variable
Write-Host "Same as previous"
Else
Write-Host "Variable is null"
Remove-Item function:\Get-FileNameThank you. The Foreach loop is now working properly.
Can I ask what is the purpose of "-ea 0" in the import-csv? I can't seem to find "-ea" as a parameter for import-csv in help.
-ea is short for -ErrorAction.
Don't retire TechNet! -
(Don't give up yet - 13,225+ strong and growing) -
How to get multiple values from the list
I've a list of an item which I queried it from the database. I also created a button that will takes a selected items from the list when it was clicked. I used javabean to get the data from database.
<% // clicked on Select District Button
Vector vselectedDistrict = new Vector();
Vector vdistrictID = new Vector();
String tmpSelectDistrict = "";
tmpSelectDistrict = request.getParameter("bSelectDistrict");
if(tmpSelectDistrict != null)
// get multiple values from the list
String[] selectedDistrict = request.getParameterValues("usrTDistrict");
vselectedDistrict.clear();
vdistrictID.clear();
if((selectedDistrict != null) && (selectedDistrict.length != 0))
for(int i=0;i<selectedDistrict.length;i++)
vselectedDistrict.addElement(selectedDistrict);
vdistrictID = dbaseInfo.getcurrentDistrictID(nstate,vselectedDistrict);
for(int i=0;i<vdistrictID.size();i++)
out.println("district = " + selectedDistrict[i]); out.println("district ID= " + vdistrictID.get(i).toString());
%>
// get vdistrict from the database here......
<select name="usrTDistrict" size="5" multiple>
<% for(int i = 0; i< vdistrict.size(); i++)
%>
<option value="<%=vdistrict.get(i).toString()%>"><%=vdistrict.get(i).toString()%></option>
<%
%>
</select>
<input type="submit" name="bSelectDistrict" value="Select District">
Lets say the item that i selected from the list is 'Xplace' and I clicked on the Select District button,
what I got is this error message:
org.apache.jasper.JasperException: Unable to convert string 'Xplace' to class java.util.Vector for attribute usrTDistrict: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager
So where is going wrong and what the message means?. Any help very much appreciated. ThanksThese are just guesses that might hopefully steer you in directions you haven't looked in yet.
I presume you used triangle brackets (< >) to avoid having the Jive Forum think it was the "italics" tag?
Are you certain this: dbaseInfo.getcurrentDistrictID(nstate,vselectedDistrict);
expects a Vector as its second parameter? And returns a Vector?
I don't believe you've shown how you use the javabean, or its code? Perhaps it should be rewritten to accept an array of strings instead of a Vector? -
Problem getting parameter values at the service end point
I am having problem getting parameter values at the service end point. I created service end point and this method is having 35 parameters and then i created test client file using Sun One Studio 5. but when i run this test client and make a call to service it sends wrong value to first three parameters to the service end point. I tried all the way round but it gave me same sort of problem. I change the order of parameters change the names of parameters but it didn�t work. And then i started chopping of parameter from the left side. And my problem is solved when my parameter list reached to 12 from 35. So is it a bug or some problem with my configuration or some thing else.
I am using sun one studio 5 with sun one app 7. My service end point does very simple thing. It only takes out put of the parameter to the server log file. And my wsdl file seems all right. There is no conflict with the count and data type of the parameter information it contains.
� Service End Point Definition (in EJB)
public java.lang.String setNewAddress(java.lang.String propertyName, java.lang.String status, java.lang.String PMSCode, java.lang.String streetNumPrefix, int streetStartNum, java.lang.String streetStartNumSuffix, int streetEndNum, java.lang.String streetEndNumSuffix, java.lang.String streetName, java.lang.String streetType, java.lang.String streetSuffix, java.lang.String localityPrefix,java.lang.String localityName, java.lang.String postcode, java.lang.String stateCode, java.lang.String countryCode, java.lang.String description, java.lang.String coordinateAccuracy, int longitude, int latitude, java.lang.String planNumber, java.lang.String lotPrefix, int lotNumber, int siteID, java.lang.String countryName, java.lang.String parishName, java.lang.String section, int portionNum, int crownAllotNum, int titleVol, java.lang.String folio, java.lang.String esa, int aliasID, int aliasTagID,String ID) {
System.out.println(propertyName);
System.out.println(PMSCode);
System.out.println(streetNumPrefix);
........ taking printout of all the paramters
� This is my WSDL file
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="NMService" targetNamespace="urn:NMService/wsdl" xmlns:tns="urn:NMService/wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<types/>
<message name="NMServiceServantInterface_setNewAddress">
<part name="String_1" type="xsd:string"/>
<part name="String_2" type="xsd:string"/>
<part name="String_3" type="xsd:string"/>
<part name="String_4" type="xsd:string"/>
<part name="int_5" type="xsd:int"/>
<part name="String_6" type="xsd:string"/>
<part name="int_7" type="xsd:int"/>
<part name="String_8" type="xsd:string"/>
<part name="String_9" type="xsd:string"/>
<part name="String_10" type="xsd:string"/>
<part name="String_11" type="xsd:string"/>
<part name="String_12" type="xsd:string"/>
<part name="String_13" type="xsd:string"/>
<part name="String_14" type="xsd:string"/>
<part name="String_15" type="xsd:string"/>
<part name="String_16" type="xsd:string"/>
<part name="String_17" type="xsd:string"/>
<part name="String_18" type="xsd:string"/>
<part name="int_19" type="xsd:int"/>
<part name="int_20" type="xsd:int"/>
<part name="String_21" type="xsd:string"/>
<part name="String_22" type="xsd:string"/>
<part name="int_23" type="xsd:int"/>
<part name="int_24" type="xsd:int"/>
<part name="String_25" type="xsd:string"/>
<part name="String_26" type="xsd:string"/>
<part name="String_27" type="xsd:string"/>
<part name="int_28" type="xsd:int"/>
<part name="int_29" type="xsd:int"/>
<part name="int_30" type="xsd:int"/>
<part name="String_31" type="xsd:string"/>
<part name="String_32" type="xsd:string"/>
<part name="int_33" type="xsd:int"/>
<part name="int_34" type="xsd:int"/>
<part name="String_35" type="xsd:string"/></message>
<message name="NMServiceServantInterface_setNewAddressResponse">
<part name="result" type="xsd:string"/></message>
<portType name="NMServiceServantInterface">
<operation name="setNewAddress" parameterOrder="String_1 String_2 String_3 String_4 int_5 String_6 int_7 String_8 String_9 String_10 String_11 String_12 String_13 String_14 String_15 String_16 String_17 String_18 int_19 int_20 String_21 String_22 int_23 int_24 String_25 String_26 String_27 int_28 int_29 int_30 String_31 String_32 int_33 int_34 String_35">
<input message="tns:NMServiceServantInterface_setNewAddress"/>
<output message="tns:NMServiceServantInterface_setNewAddressResponse"/></operation></portType>
<binding name="NMServiceServantInterfaceBinding" type="tns:NMServiceServantInterface">
<operation name="setNewAddress">
<input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="urn:NMService/wsdl"/></input>
<output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="urn:NMService/wsdl"/></output>
<soap:operation soapAction=""/></operation>
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/></binding>
<service name="NMService">
<port name="NMServiceServantInterfacePort" binding="tns:NMServiceServantInterfaceBinding">
<soap:address location="http://localhost:80/NMService/NMService"/></port></service></definitions>
� I followed steps given this example. http://developers.sun.com/prodtech/javatools/jsstandard/reference/docs/s1s5/stockapp.html.
If some one know what is wrong. Is it me or some thing wrong with the method I followed. But I am sure that I followed exactly the same method as it given in examples. So if some one can guide me
ThanksI just found that there is a bug with Sun One Studio 5. It creates faulty JSP file to test the client for the web services. With above problem I tested my web services using different developing environment such as Jdeveloper 10g. I created client stub using wsdl file generated by sun one studio. And made call to my web service and all the parameter reached perfectly at service end point. And then I used stub class created by sun one studio for the client and made the same call. And it also went well. So the problem is with the test application (JSP File) sun one creates for my web service.
This is the majore problem i faced during the development. But still there is many problem along with this which is not seriouse enough but requires attension. I would like sun developers to make sun one studio IDE simpler and handy . -
How to make the LV front panel controls the current value through the programis set as the default value when the next time you open?
1110340051Try this: Re: How to make a VI remember the latest control value?
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice -
Problem in getting the current value of the drop down while calling value change listener
I have 2 drop down list. I am trying to get the value of first drop down from other drop downs value change listener. Initially one drop down contains a default value. First time I got the value while calling the value change listener. But if I change the default value to other in the first drop down and call the value change listener of the second drop down then I got the old value in the bean. Can anyone suggest a process
If I use the following code it gives me the current index.
valueChangeEvent.getComponent().processUpdates(FacesContext.getCurrentInstance());
System.out.println(valueChangeEvent.getNewValue());
This is also giving me current index.
BindingContainer container = BindingContext.getCurrent().getCurrentBindingsEntry();
AttributeBinding attrIdBinding = (AttributeBinding)container.getControlBinding("PersonTypeId1");
if(attrIdBinding.getInputValue()!=null)
System.out.println(attrIdBinding.getInputValue().toString());
But at last I got some help from Shay Shmeltzer's Weblog.
BindingContainer bindings =
BindingContext.getCurrent().getCurrentBindingsEntry();
// Get the sepecific list binding
JUCtrlListBinding listBinding =
(JUCtrlListBinding)bindings.get("PersonTypeId1");
// Get the value which is currently selected
Object selectedValue = listBinding.getSelectedValue();
long value =0L;
if(selectedValue!=null){
System.out.println("Sudip.. Person Type using bindings"+selectedValue.toString());
But this returns "ViewRow [oracle.jbo.Key[300000860721156 ]]"
300000860721156 is the original value.. Would you please help me to figure it. -
Using groovy expressions to get a value of the current row
Hi,
I have a bounded task flow. The first step in the flow is calling an ExecuteWithParameters on one of my views. Based on the result of this query, I want to go to either Page1 or Page2.
So I have a router. I first tried to route based on whether or not the result of the query contained only one row. That worked fine. But I want to add a condition to that.
Basically, if the query returns one row AND that row has an attribute named 'Noc' == 1, then I want to go to Page2. Otherwise, go to Page 1.
Right now to get the estimatedRowCount I am getting the iterator from the pageDef file created for my ExecuteWithParams object. To see if 'Noc' == 1, I tried this:
#{data.rcl_view_reimbCode_search_results_task_flow_reimbCode_search_results_task_flow_ExecuteWithParamsPageDef.ReimbCodeSearchView1Iterator.currentRow.getAttribute("Noc") == 1}
But it is complaining of grammar issues.
What is the best way to go about getting the value of my attribute in a groovy expression?
Thanks,
JoelHi,
the best way is to use a managed bean reference
1. create a binding for the router
2. Expose the queried iterator in the PageDef file
3. write a managed bean that accesses the binding
BindingContext bctx = BindingContext.getCurrent();
BindingContainer bindings = bctx.getCurrentEntry();
DCIteratorBinding iter = bindings.get("NameOfIterator");
// i) get estimated row count
// ii) get attribute value
//iii) evaluate
// iv) return true/false
Reference the managed bean from the router
Frank -
Getting rpm values from the fans on the MSI NEO2-FIR motherboard doesn't work
I currently have 6 Noctua NF-S12-1200 120mm fans spinning in my computer but i am unable to get rpm values from them except the cpu-fan. It doesn't work to get a readout from the others with either, BIOS, Dual Core Center or Speedfan. Regarding Speedfan is it true it don't support the SuperIO Chip on the Neo2, the FINTEK F71882F? It's not currently listed in their supported temperature sensors list.
So whats the problem? Shouldn't atleast DualCore Center atleast show the rpm's from the other chassis fans?
Or the fans don't support sensor readings?
Thanks!Quote from: Jack on 13-October-10, 00:15:36
Well, there is nothing that can be done about. SysFAN 1 & 4 support sensor readings, #2,#3 and #5 don't. You can also see that in BIOS Setup. #1 are the only ones that show up there (H/W Monitor section). This is not a malfunction or a bug. You have to live with no fan sensor readings or be creative about the wiring.
The problem is that i use the UNLA cables from Noctua which half the speed of the NF-S12 fans i run with. And it blocks the rpm readouts in Speedfan and BIOS.
http://www.noctua.at/main.php?show=productview&products_id=5&lng=en
Strange thing is that the CPU fan reads fine with the ULNA cable attached but the SYSFANS will not read the rpm with the ULNA cables.
What is wrong? -
UDF: how to get a value in the previous record when lopping over records?
Hello
I have this challenge:
Source message:
<row>
<ID>111</ID>
<Score>200</Score>
<Date>2010-01-01</Date>
</row>
<row>
<ID>111</ID>
<Score>230</Score>
<Date>2010-01-02</Date>
</row>
<row>
<ID>112</ID>
<Score>230</Score>
<Date>2010-01-03</Date>
</row>
etc...
Now the case is, that IF the value of ID of the current record (row) is equal to the value of the ID of the previous record AND the Score value of the current record is bigger than the Score value of the previous record THEN a record in the target message must be created with these values:
Target Message:
<row>
<ID_target> value of source ID </ID_target>
<Score_yesterday> Score value of previous record (day) </Score_yesterday>
<Score_current_date> Score value of current record </Score_current_date>
<Date_current> Date of current record </Date_current>
</row>
I am thinking of using GlobalContainer to store the previous values but am note sure how to maintain these previous values. In addition, I am thinking about using a UDF on the target row record, which will just create the row, if conditions are met (result.addValue("");) and then just make a simple mapping of the ID_target, Score_current_date and Date_current fields and make an other UDF for the Score_yesterday field where I get the Score for the previous record using the GlobalContainer value, that I stored in the other UDF.
BUT:
Should I use "All values of context" or "All values of Queues" in the UDF used on the row record and how do I make sure, that the Score_yesterday global container value is maintained correctly? I am planning of setting it in the UDF used on the Target row record but will it then be in sync with the consuming UDF of the Score_yesterday field?
Java code to go into the UDF would be very much appreciated
Mikaelint tmp1;
int tmp2;
int len = ID.length;
for(int i =0;i< len;i++)
if( i!= len-1)
tmp1 = Integer.parseInt(Score<i>);
tmp2 = Integer.parseInt(Score[i+1]);
if(tmp2 >tmp1)
if (TARGET[0].equals("ROW"))
result.addValue("");
else if (TARGET[0].equals("ID_TARGET"))
result.addValue(ID[0]);
else if (TARGET[0].equals("SCORE_YDAY"))
result.addValue(Score<i>);
else if (TARGET[0].equals("SCORE_CDAY"))
result.addValue(Score[i+1]);
else
result.addValue(DT[i+1]);
I got the following results for the set of data that you provided.
Target-XML
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_TestingTGT xmlns:ns0="http://monsanto.com/CIC">
<Row>
<ID_TARGET>571515198310502207</ID_TARGET>
<SCORE_YDAY>1000</SCORE_YDAY>
<SCORE_CDAY>1010</SCORE_CDAY>
<CURRENT_DATE>2010-03-02 00:00</CURRENT_DATE>
</Row>
<Row>
<ID_TARGET>571515198310502207</ID_TARGET>
<SCORE_YDAY>1000</SCORE_YDAY>
<SCORE_CDAY>1050</SCORE_CDAY>
<CURRENT_DATE>2010-03-04 00:00</CURRENT_DATE>
</Row>
<Row>
<ID_TARGET>571515198310502207</ID_TARGET>
<SCORE_YDAY>1050</SCORE_YDAY>
<SCORE_CDAY>1080</SCORE_CDAY>
<CURRENT_DATE>2010-03-05 00:00</CURRENT_DATE>
</Row>
<Row>
<ID_TARGET>571515198310502108</ID_TARGET>
<SCORE_YDAY>2000</SCORE_YDAY>
<SCORE_CDAY>2040</SCORE_CDAY>
<CURRENT_DATE>2010-03-03 05:00</CURRENT_DATE>
</Row>
<Row>
<ID_TARGET>571515198310502108</ID_TARGET>
<SCORE_YDAY>2000</SCORE_YDAY>
<SCORE_CDAY>2040</SCORE_CDAY>
<CURRENT_DATE>2010-03-05 05:00</CURRENT_DATE>
</Row>
<Row>
<ID_TARGET>571515198310302203</ID_TARGET>
<SCORE_YDAY>3000</SCORE_YDAY>
<SCORE_CDAY>3020</SCORE_CDAY>
<CURRENT_DATE>2010-03-05 00:00</CURRENT_DATE>
</Row>
</ns0:MT_TestingTGT> -
SSAS Tabular DAX- Need to get MAX value of the MIN (top)hierarchy level row
EDIT:
I got closer to resolving the issue using MAX.
However, If I remove the department hierarchy and just place on the MAX measure I get the single largest value out of all departments.
It would be ideal if the measure could still SUM the "top level" values across everything in the system if the hierarchy is not placed on the rows grouping.
So it returns the largest value for a given department, but if the department hierarchy isn't present I need it to return a SUM of all the level 1 values for all departments...
Basically return MAX value from the MIN L1ID's DeptLevel value, but I can't seem to construct that DAX query. So if DepartmentID hierarchy is on display it gets MAX per row, but if that is removed it dips into MAX GoalValue for each L1ID grouping with
the MIN DeptLevel.
/EDIT
I have a rather odd data table I'm bringing into a SSAS Tabular model.
Instead of having all data at each child level and then it adding up to a grand total in the parent, it has a grand total predefined at each child level.
I just need this tool to display the raw data if at all possible instead of trying to aggregate everything. Filter on active level, ignore child levels.
Is there a way to do that?
Example:
SalesGoalsByDepartmentLevel:
Level1 (top level) = 5,000
Level2( lower level) = 0
Level3(lower still) = 500
Level 4(lowest) = 4,250
So note that adding up all the child levels is still $250 shy of the top 5,000.
IT is just an odd business rule, basically each level is expected to meet that goal or exceed it, the top level goal is 5,000 but management doesn't care where that last 250 comes from, they do are that each defined level is met.
These levels are in a hierarchy so if I view the top level of the hierarchy it adds up to 4250+500+5000=9750 when I just want to see 5,000 at the top level and the details when they drill down.
I added a filter to just filter to the top level, but then when I drill down of course those lower levels are blank.
Is there a way to filter on the current displayed level without aggregating all child levels?
Thanks!You might want to take a look at the Parent-Child Hierarchies pattern here:
http://www.daxpatterns.com/parent-child-hierarchies/
You might write DAX code to check what is the "current" level (see BrowseDepth measure in the sample file you can download) and depending on its level, se the filter to blank to all the levels below, so you don't aggregate "children".
Just an idea, I'm not sure if it corresponds to your requirement and I don't have time to make more tests.
I hope it will be helpful.
Marco Russo (Blog,
Twitter,
LinkedIn) - sqlbi.com:
Articles, Videos,
Tools, Consultancy,
Training
Format with DAX Formatter and design with
DAX Patterns. Learn
Power Pivot and SSAS Tabular. -
How to get current value of checkBox on button press programatically in adf
Hi,
I want to get the current value of checkbox(checked/unchecked or 0/1) in my java bean whenever I press submit button on my jspx page.
My JDeveloper version is : 11.1.1.6.0Where is the checkbox value bind to? The status of hte checkbox is hold in the value property of the checkbox. This is normally an EL like
#{bindings.Myvar1.inputvalue}or something pointing to a bean property. This value can be read from the action listener of your submit button
BindingContainer bindingContainer = BindingContext.getCurrent().getCurrentBindingsEntry();
AttributeBinding attr = (AttributeBinding)bindingContainer.getControlBinding("Myvar1");
Object obj = attr.getInputValue();Timo
Maybe you are looking for
-
In ME22N deleted line item should not be Re-activate
Dear Sap Guru's For Purchase order in T.code ME22N deleted line item should not be reactivate. If i create some line items in this t.code and i delete these items then ince again someone wants to views these they he should not be
-
I have a plain vanilla Quicksilver, DP 800 MHz, right now has 2 80 GB ATA HDDs. One of the drives it is failing on and off, with no pattern. These are old driver, like 8 years of so, that came with the box when I got it second hand. I'm planning on r
-
Active Export list of customer discount set up into Excel file
Hi Every Body, How to export a list of customer discount from plant to Excel Spread sheet. Please provide me your valuable inputs Thanks Prasad
-
Non-Library Synced music lost after latest iTunes update. Help!
I downloaded/update to the latest itunes which caused my phone to be reset to its factory settings. Although my contacts, photos and apps ect. were recovered, my music was not. I had a lot of music (2500+) on my phone which was however not synced to
-
What is crashing photoshop cs4
anyone know how I can find out what is causing photoshop to crash? is the crash report worth looking at? IS there a resource for interpreting crash reports? Is it worth contacting adobe support? Photoshop cs2 was my most rock-steady application. I