If less than replace with no value or zero
I'm trying to use the diadem calculator to create the equivalent of a 'if less than 4.0 replace with no value or 0' for the complete cell count of a named channel . Either create a new channel for the result or replace the old values
thanks
AdeK
Hi Adek,
Twigeater is absolutely right, as always, and he's pointed you to the most recent and syntax-friendly option available in DIAdem 11.0 and later.
If you are using an older version of DIAdem, or if you're manipulating very large channels, I'd recommend using the old "FormulaCalc()" function, which is faster for numeric channels and has a boolean construction that automatically resolves to 0 or 1, corresponding nicely to what you want. Here's the code:
R1 = 0.2L1 = CNo("Noise data/Noise_1")Call FormulaCalc("Ch(L1):= (Ch(L1)>R1)")Brad Turpin
DIAdem Product Support Engineer
National Instruments
Similar Messages
-
Parameterized queries running much slower than ones with hardcoded values
Very often there is a huge performance difference when using parameters in a query, compared to running the same code after replacing the parameters with hardcoded values: the parameterized version of the code runs much slower!
The case is not parameter sniffing as it is not a (compiled) stored proc, but code executed directly from the editor and the performance issue has been observed in different versions of SQL Server (2000 and 2005).
How is this explained and how can the parameterized queries have similar performance with the hardcoded ones?
Also, why does this happen in some cases and not always?
Finally, the same is sometimes the case with stored procs: a very slow running proc speeds up tremendously when running its code directly, instead of calling the procedure --and even faster, according to the previous, when its parameters are replaced with
hardcoded values>>The case is not parameter sniffing as it is not a (compiled) stored proc, but code executed >>>directly
from the editor ?>>>and the performance issue has been observed in different >>>versions of SQL Server (2000 and 2005).
Something like below?
--SQL Server creates 3 execution plan rather only one
DBCC FREEPROCCACHE
GO
SELECT *
FROM Sales.SalesOrderHeader
WHERE SalesOrderID = 56000
GO
SELECT * FROM
AdventureWorks.Sales.SalesOrderHeader WHERE
SalesOrderID = 56001
GO
declare @i int
set @i = 56004
SELECT *
FROM Sales.SalesOrderHeader
WHERE SalesOrderID = @i
GO
select stats.execution_count AS exec_count,
p.size_in_bytes as [size],
[sql].[text] as [plan_text]
from sys.dm_exec_cached_plans p
outer apply sys.dm_exec_sql_text (p.plan_handle) sql
join sys.dm_exec_query_stats stats ON stats.plan_handle = p.plan_handle
GO
----This time only (we get parameterization)
DBCC FREEPROCCACHE
GO
EXEC sp_executesql N'SELECT SUM(LineTotal) AS LineTotal
FROM Sales.SalesOrderHeader H
JOIN Sales.SalesOrderDetail D ON D.SalesOrderID = H.SalesOrderID
WHERE H.SalesOrderID = @SalesOrderID', N'@SalesOrderID INT', 56000
GO
EXEC sp_executesql N'SELECT SUM(LineTotal) AS LineTotal
FROM Sales.SalesOrderHeader H
JOIN Sales.SalesOrderDetail D ON D.SalesOrderID = H.SalesOrderID
WHERE H.SalesOrderID = @SalesOrderID', N'@SalesOrderID INT', 56005
GO
select stats.execution_count AS exec_count,
LEFT([sql].[text], 80) as [plan_text]
from sys.dm_exec_cached_plans p
outer apply sys.dm_exec_sql_text (p.plan_handle) sql
join sys.dm_exec_query_stats stats ON stats.plan_handle = p.plan_handle
GO
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
How does operator 'less than' work with Rectangle objects?
Just found in legacy code the following:
private var firstRect:Rectangle;
private var secondRect:Rectangle;
if (firstRect < secondRect)
// do something
How does operator 'less than' work with Rectangle objects?
Doc says that object is converted to number if it is not a String.
Rectangle is not a String, though has conversion to String.
Please help.IME the best way to know for sure is to experiment. The docs are only one person's best understanding of how things worked on the day, which is seldom 100% accurate. I find that even with code I wrote I can't accurately say 100% of what it does until I've worked with it for a while. Keep in mind that the docs are usually written when the code is written, so never expect more than a rough idea from the docs.
-
Limit the no of segments per IDOC to less than the current default value
Hi friends,
please help me in the following issue.
The possibility to limit the number
of segments per IDOC to less than the current default value.
Purpose is to limit the traffic of IDOCs between systems.
How to solve this issue to avoid traffic
Thanks in advance.
Regards
SandeepHi Kiran,
Actually we are using standard ones at that time we are getting prolems. When using custom developed ALE's
we are putting segment size is less.To decrease segment size is there any filtering at the sender side? To change segment size may be nedd to take help form SAP.
But if have filtering at any level from sender side need to confirm before consult SAP.
Regards
Sandeep -
Error Writing Less Than Sign with FileAdapter
Hello.
Looking at the Flow Trace I can that the input variable of the FileAdapter is being populated correctly (XML tags). When looking at the file's contents though, the result of the less than sign is its character entity: '<';.
Is there a way to force it to print the less than sign? Also, why does it write the character entity for the less than sign and not the greater than sign?
Thanks.
Edited by: oracleistheway on May 24, 2013 6:32 AMHi Arik. Thank you for that information but it is not working. I think it is not working because the DOE feature is done during an XSL process.
I was able to get my desired result by creating a native file and Delimited type. I then selected File contains only one record and had it delimited by Single Space and no optional delimiter.
Thank you all for looking at this thread.
Edited by: oracleistheway on May 26, 2013 10:33 AM -
Hi, I have two tables in my spreadsheet (a personal budget) showing all my expenses spread over time. In the first table, each column is a month and year, each row is a type of expense (gas, rent, groceries, etc).
October 2013
November 2013
December 2013
February 2014
Income
3000.00
3200.00
2800.00
Gas
85.00
95.00
75.00
Rent
1200.00
1200.00
1200.00
Groceries
110.00
130.00
150.00
Eating Out
92.00
76.00
80.00
Clothes
0.00
90.00
30.00
The second table is this month's expenses so far (I enter the figures for "X Month, So Far" in a third table, which doesn't factor in here).
December 2013, So Far
Average +/-
Income
2800.00
-200.00
Gas
75.00
-15.00
Rent
1200.00
0
Groceries
150.00
+30.00
Eating Out
80.00
-4.00
Clothes
30.00
-15.00
I want the correct formula for the Average +/- column. I want it to calculate the monthly average for that particular type of expense, and then calculate the difference from this month's expenses so far. The key is that I want it to add all the sums from a particular row with any value in their cells, even if it's zero. For instance, all of the examples above would divide the sums by two - even the row for Clothes, which has a cell with 0.00, but I would need that to count as a value.
Also, when calculating the average, I would want the formula to exclude the current month, which is entered automatically in the next column.
I would need a formula I wouldn't have to change every month. Can you help?Hi sk,
"The key is that I want it to add all the sums from a particular row with any value in their cells, even if it's zero. For instance, all of the examples above would divide the sums by two - even the row for Clothes, which has a cell with 0.00, but I would need that to count as a value."
What you've described is the default condition for AVERAGE over a range of cells—any cell containing a numerical value is included, and cell that is empty or contains a text value is ignored. Here are some examples:
Creating a constant formula that will ignore the current (and future) month(s) can be done by ensuring that the amounts in the current month are seen as Text, rather than as numbers, as I've done in column C of row 6.
This can be done using a formula to transfer amounts from the 'third table' you mention to the first table in your example (showing monthly expenses for earlier months and partial totals for the current month). The formula would use IF to add text to the begining or end of the totals IF the column was for the current month, but to transfer of=nly the monthly totals for previous months.
=IF(earlier-month,"xx"&formula,formula)
Both instances of formula are the same—whatever formula you are currently using to transfer the amounts to this tabe.
An alternate method would be to add a second header row to the top of the forst table, and place checkboxes into thoes cells. Check the box when you want to incude that column's values in the averages.
For this method, AVERAGE would be replaced with AVERAGEIF, with the 'IF' condition a simple reference to the row of checkbox cells. As each month passed, the only change needed would be to check the box in the just-passed month's column.
Regards,
Barry -
No Incompletion Log for Sales Order with net value as zero
Hi all,
There is an Inbound IDOC which creates a Sales Order.
When we check the IDOC, we find that it has got 4 line items (E1EDP01). However, for all the items except the third one (for example), the segment E1EDP05 is filled. In the segment E1EDP05 the field KRATE contains the corresponding net value for the respective line items.
Then when we check Sales Order which is created, we find that the third line item (for example) has the net value as zero. In this case, ideally there should have been an entry in the Incompletion Log. However, it does not happen so.
I suppose the issue is with the third line item in the IDOC for which the segment E1EDP05 is not present. I have debugged the corresponding FM is IDOC_INPUT_ORDERS, but was unable to find any clue.
Please let me know the reason for this.
Thanks and regards,
AnishurIn routine interpret_idoc_orders the item conditions are filled by calling
WHEN 'E1EDP05'.
MOVE IDOC_DATA-SDATA TO E1EDP05.
PERFORM ZUORDNEN_ORDERS_E1EDP05.
In case KRATE is empty no values are transferred to the order
IF NOT E1EDP05-KRATE IS INITIAL.
PERFORM IDOC_CUR_MOVE USING E1EDP05-KRATE XKOMV-CURRDEC
XKOMV-KOEIN
XKOMV-KBETR D_FLAG_P-PKON.
ENDIF.
If that is a valid scenario, you need to adjust your incompletion procedure in customizing to include the net value on item level so any missing value is reported.
If this is not supposed to happen you might want to hook into one of the user exits in the idoc and in case KRATE is missing let the idoc fail.
Hope that helps,
Michael -
How to find and replace with sequential values?
im building a website. it contains 12 main images per page and luckily according to my design the source code per page contains 12 <img> tags only (rest is background and stuff). now for many pages i keep using a particular page as template and then change each and every image by browsing and clicking. Now i want to make my work easy.
the images that i want to add in every page are sequentially file named. 001.jpg , 002.jpg .......... and so on.
So is there some way that i can use find and replace , to find the <img> tags and fill them all with values sequentially that is the first <img> tag containts 001.jpg and the second containts 002,jpg and so on .
the pages are many thats why i want to make this easy
thanks very much for helpWill they ever do this? I just wish Adobe would purchase TextPad and integrate it into Dreamweaver. In TextPad, from the manual:
Other TextPad options in the replacement string:
\i Generate a sequence number.
\i(N,M) Ditto, starting at N and incrementing by M.
So beautifully simple. -
I've followed all the suggestions for saving the battery life but the battery still discharges very quickly. The only way I can stop it discharging is by turning the ipod off, which sort of defeats the object!
It's been suggested that I totally reset the ipod as new and then set it up again from scratch. Does anyone now how likely this is to help, as it will take rather a long time?Looks like good news!
I finally bit the bullet and did a reset as new.
It was a total pain as you can imagine, but it wasn't the end of the world to go through i-tunes reselecting the apps etc to sink (it was actually a pretty useful exercise because my ipod was full of apps I didn't really use!).
Anyway, it's been off the charger now for nearly five hours and I've been using it for bits and pieces like, the calculator, internet search over wifi, map viewing etc. and the battery is showing 97%!!! All setting are as per the default start up. I haven't changed brightness or anything like that.
Interestingly, now when it goes into standby, the router shows that the wifi link has dropped. When I then wake it again the link restarts after a few miliseconds. This didn't used to happen before.
I'm keeping my fingers crossed and will see how it goes over the weekend and report back on Monday! -
Report for Asset with only values (No Zero values)
Hi All
There is requirement where in the user wants to genenerate report for assets with values .There should not be Zero balance assets included in the output. In short only with values in the asset master the report needs to be generated. Can one have any idea on this .
regards
Navin
Edited by: Naveen Rao on Jan 22, 2009 10:04 AMHi
Can you please specify the report name.
regards
Navin -
Subtotal less than or equal to a max value
Hi,
I have the following values in a table:
drop table t;
create table t (key number, ind varchar2(1), num number);
insert into t (key,ind,num) values (1,'Y',2);
insert into t (key,ind,num) values (2,'Y',10);
insert into t (key,ind,num) values (3,'Y',12);
insert into t (key,ind,num) values (4,'Y',9);
insert into t (key,ind,num) values (5,'Y',1);
insert into t (key,ind,num) values (6,'Y',1);
insert into t (key,ind,num) values (7,'Y',8);
insert into t (key,ind,num) values (8,'Y',1);
insert into t (key,ind,num) values (9,'N',11);
insert into t (key,ind,num) values (10,'N',6);
commit;The values are:
test@ORA92> select * from t order by key;
KEY I NUM
1 Y 2
2 Y 10
3 Y 12
4 Y 9
5 Y 1
6 Y 1
7 Y 8
8 Y 1
9 N 11
10 N 6
10 rows selected.
test@ORA92>For all rows with ind = "Y", I want to add "num" as long as the subtotal is less than or equal to a max value (15). For all rows with ind = "N", I want the sum of "num".
It should be as follows:
KEY I NUM
1 Y 2 <- consider this, as subtotal is now 2 which is < 15
2 Y 10 <- consider this, as subtotal is now 12 which is < 15
3 Y 12 <- ignore this, as subtotal would be 24 which is > 15; keep running total as 12.
4 Y 9 <- ignore this, as running total would be (12+9=) 21, which is > 15; keep running total as 12
5 Y 1 <- consider this, as running total is now (12+1=) 13, which is <= 15
6 Y 1 <- consider this, as running total is now (13+1=) 14 which is <= 15
7 Y 8 <- ignore this, as running total would be (14+8=) 22, which is > 15; keep running total as 14
8 Y 1 <- consider this, as running total is now (14+1=) 15, which is <= 15
9 N 11 <- add this to subtotal for ind = "N"; subtotal = 11
10 N 6 <- add this to subtotal for ind = "N"; subtotal = (11+6=) 17
Return "ac" (subtotal for ind = "Y") = 15 - the one we got at key = 8
Return "dc" (subtotal for ind = "N") = 17 - the one we got at key = 10I have a pl/sql block that does the same:
test@ORA92>
test@ORA92> --
test@ORA92> -- To derive "ac" value:
test@ORA92> -- Loop through t, and for ind = "Y", keep on adding "num" as long as
test@ORA92> -- the subtotal is less than "maxnum". Disregard values of "num"
test@ORA92> -- that would make the subtotal greater than "maxnum".
test@ORA92> -- To derive "dc" value:
test@ORA92> -- Sum of "num" values for ind = "N"
test@ORA92>
test@ORA92>
test@ORA92> declare
2 maxnum number := 15;
3 ac number := 0;
4 dc number := 0;
5 prev number := 0;
6 begin
7 FOR i IN (SELECT ind, num
8 FROM t
9 ORDER BY key)
10 LOOP
11 IF (i.ind = 'Y') THEN
12 ac := i.num + prev;
13 IF (ac > maxnum) THEN
14 ac := prev;
15 ELSE
16 prev := ac;
17 END IF;
18 ELSIF (i.ind = 'N') THEN
19 dc := i.num + dc;
20 END IF;
21 END LOOP;
22 dbms_output.put_line('maxnum = '||maxnum);
23 dbms_output.put_line('ac = '||ac);
24 dbms_output.put_line('dc = '||dc);
25 dbms_output.put_line('prev = '||prev);
26 end;
27 /
maxnum = 15
ac = 15
dc = 17
prev = 15
PL/SQL procedure successfully completed.
test@ORA92>
test@ORA92>Is there a way to do this processing in SQL instead ? The database version is 9i R2 (9.2.0.8.0).
Thanks and appreciate any help and/or pointers.
pratz...Rob, as it was mentioned here it can be done by Hierarichal Queries, disregarding a lot of drawbacks of such a way.
SQL> with temp as (select t1.*,
2 (select case when t1.ind = 'Y' and sum(num) > 15
3 then null
4 else sum(num)
5 end
6 from t t2
7 connect by level <= t1.lvl
8 and t2.key =
9 regexp_substr(t1.path, '[^/]+', 1, t1.lvl - level + 1)
10 start with t2.key = t1.key) summa
11 from (select t.*,
12 level lvl,
13 sys_connect_by_path(key, '/') path,
14 sys_connect_by_path(rn, '/') path_rn
15 from (select t.*,
16 lpad(row_number() over(partition by ind order by key),2,'0') rn
17 from t) t
18 connect by prior key < key
19 and prior ind = ind
20 start with (key, ind) in
21 (select min(key), ind from t group by ind)) t1)
22 --
23 select ind, avg(summa) keep(dense_rank first order by path_rn) max_summ
24 from (select temp.*,
25 decode(instr(lead(path_rn) over(partition by ind order by path_rn), path_rn),1, 0, 1) flag
26 from temp
27 where summa is not null)
28 where flag = 1
29 group by ind
30 /
IND MAX_SUMM
N 17
Y 15
SQL> -
Terrible download speed with Infinity 2 (less than...
I was a relatively early adopter of BT infinity. When I first signup I recieved a consistent 70mbps+ down 80mbps up.
Over the last few months this has dropped to around 40mbps down and 12mbps up.
I posted here regarding the issue, contacted BT, and even Emailed the tech support guys recommended here on this very forum.
Unfortunately nothing improved, however since 40mbps down was okay for almost everything I needed to do I decided to leave it.
Now however, the situation has become dire. For the last month my download speed has been consistently less than 4mbps with my upload speed being 2-3x as fast!
The BT speedtester refuses to complete due to the test taking too long. However I have managed to get a screenshot from speedtest.net.
To make matters worse, webpages down't always seem to complete, with many requests eventually timing out.
I am at a complete loss and would like some advice on where to go from here. I have for all intents and purposes lost faith in the standard BT customer service having spent hours on the phone with them before when my speed dropped to 40mbps a few months ago.
Any advice would be very much appreciated.Hi
I also am having the exact same issue. I am on the phone now and they are telling me now that is all my line can handle.
This is disgusting, the service is disgusting, cannot get an engineer out. For over 10 months i could get 60mbps steady downloads now i can't
even stream a youtube video!!
even though i have another infinity 2 line in the downstairs living room getting 65mbps steady downloads from the same exchange. -
How to get value less than 0 = 0
I am trying to get a formula to do two operation in one field something like:
form1.#subform[0].yes1.qn1::calculate - (JavaScript, client)
(p1-s1)
then if the value is less than "0" the the value = "0"
what I have so far is not working, any help is greatly appreciated.
if
(this.rawValue < 0) this.rawValue
= 0;
Thank you.Srini,
Thanks for the reply, although I still cannot get this to work.
I changed the fields to numeric and it still is not working. -
Greater than/less than comparisons
Hello!
Does somebody has any idea why I get this error message ?
Greater than/less than comparisons with character type operands may not be portable ?
friendly regards
erdemHi Erdem,
You can only use the comparison operators with in the Numeric Characters or the parameters with integer Data Types or Decimal Data Types.
For Example,
Data : A type I Value '5',
B Type I Value '10'.
If A < B.
else.
Thanks.
Reward points If Helpful. -
Less than 5 hours New Macbook Pro
I thought the new 15 inch Macbook Pro was supposed to do something around 8-9 hours of battery. I am getting less than 5 with mild use (internet browsing, hulu). Is anyone else having this problem? Should I call Apple about this?
William DovaleHey!
Also- we have to be careful with the new graphics chips. In theory they're great, and I really like the idea, but it will take a while to get the sweet spot right. The new graphics chip will cut that time considerably, because its still pretty hungry for power. If you want to find out which of your applications fire up the 330M then you (as far as I know) have to open system profiler, then go to Graphics/Displays and then see whether Intel HD or the 330M as 'colour LCD' listed at the displays section at the bottom.
Open a program and then hit apple and R in the system profile window, if the colour LCD isnt in the Intel HD graphics box, that means that the faster graphics chip has been activated. This is an issue, because I hadn't realised, for example, that skype uses some of the 'advanced APIs' which make the new graphics card chip in. So as soon as you open skype (you dont even have to log in) your machine will continue to run off the more power-hungry 330M until you close it.
What I find interesting is that it seems only to look at the program and not at how many resources its pulling. For example, i've fired up so many HD steams in safari that my machine has been unable to process them all. Yet still it hasn't switched over to the 330M in that instance because 'safari' doesnt call for the advanced graphics APIs.
So far the ways i've managed to trigger constant reliance on the 330: (I can only speak for me 2.53)
-connecting an external monitor
-skype
-iPhoto
-Photobooth
-Garageband
-iMovie
Programs which do not exhibit this behaviour include:
-Safari (so far havent been able to trigger 330M at all)
-iTunes (even when using the visualiser hasn't triggered)
-iChat (doesnt trigger unless your webcam is engaged for a call or whatever)
-Mail
-iCal
-Spotify
-Quicktime (only engages the 330M when videos are loaded, not when program is merely open but not doing anything)
-VLC (only when playing videos- just as quicktime)
So basically- just check out what's running on your system. Skype seems to be glaring issue for me at the moment. Everything else is using the 330M conservatively, whereas skype, which im sure doesn't need the power of the 330M at all times, makes it continually run, which will bring down your battery life.
I'm sure this will easily be fixed -probably from skype themselves rather than apple, but that is merely speculative. For now I just wished there was some utility we could use or keep in the system tray or dashboard which would tell us which graphics card is running. Even some mention in activity monitor would be great..
Running the screen at 65% brightness and with the energy saving settings at default, my macbook pro has got about 7 hours out of it.
Flash-rich websites, javascript and unnecessary processor cycles will all contribute towards a real-world reduction of battery life. And the glossiness of the screen really doesn't help either.. haha...
Maybe you are looking for
-
Remote app and an ethernet network
I'll try to keep this simple. Everything was working fine with 10.5.8, no longer with Snow Leopard. I have an ethernet network connected to DSL. Apple TV is hooked up via ethernet. MacPro is hooked up via ethernet. Airport Express is hooked up to eth
-
Document closed while making payments on account
Dear all, I'm facing the following issue. Eg:- I have created one AR/AP invoice for letsay 'x' business partner for INR.10000. While making incoming or outgoing payments,when i'm choosing this BP,all the open invoices will appear one by one.Now i've
-
Back button opens apps in background
While being on the home screen and if back button is pressed it opens the app in the background and that too is restarted. This is very annoying as it opens the app right away even when its not needed.
-
Hi All, Can anyone tell me the query to get the list of all AP Reserve Invoices. Regards S
-
I need some help here. someone please respond with some type of idea.
okay, here's the deal when i take the Ipod out of the usb, i cut it on, and it's just a constant green light in the front that wont go away. it wont play, and wont have any affect on the buttons or anything. it's just a steady green light. it wont sh