Calculation of the sum with condition
HelloI start with BI publisher, and I want to take a NAP with condition.
My report output XLS, I haves columns, named ACCOUNT_TYPE and TREE_NODE and MOENTARY_AMOUNT_03 that are my PS query fields
I want to sum only when a condition is true.
<? xdofx:If ACCOUNT_TYPE = 'R' AND TREE_NOD = 'TEST' then
Sum (MONETARY_AMOUNT_03)
end if? >
This does not,
could you help me?
thaks!
You should do this:
Tags: Business Intelligence
Similar Questions
-
Calculation of the sum of a column on a XML editor RTF with NULL values
Hello
I have a problem to get the sum of a column in XML editor RTF, if one of the lines has a null value.
say, I have 4 columns and values
CASES1:
NULL, NULL, 4, NULL
Sum, I expect is: 4
CASE2:
NULL, NULL, NULL, NULL
I'm waiting for is a null
Is there a way to do this?
Thank you
AnitaTry this
AMT's column
-
Hello guys I have a simple query, but it just dosent seem to work. I have a column that I would only add another column is between a range, but I keep getting '0', even if a part of the range has values. can someone please point out what is obvious.
Thanks in advance
FYI If part of the range has a value but the other party does not, I always get a '0 '.select nvl(sum(fgbopal_14_ytd_actv),0) from fgbopal where fgbopal_fund_code = '400002' and nvl((fgbopal_acct_code),0) between '7000' and '7019' and nvl((fgbopal_acct_code),0) between '7046' and '7177'
Help!Hello
user633029 wrote:
Hello guys I have a simple query, but it just dosent seem to work. I have a column that I would only add another column is between a range, but I keep getting '0', even if a part of the range has values. can someone please point out what is obvious.Thanks in advance
select nvl(sum(fgbopal_14_ytd_actv),0) from fgbopal where fgbopal_fund_code = '400002' and nvl((fgbopal_acct_code),0) between '7000' and '7019' and nvl((fgbopal_acct_code),0) between '7046' and '7177'
FYI If part of the range has a value but the other party does not, I always get a '0 '.
Help!The last two conditions cannot be true at the same time.
If, on a line, ggbopal_acct_code is between '7000', and '7019', then it will not be between ' 7046 'and ' 7177'.
If it's between '7046' and '7177', then it will not be between ' 7000 'and ' 7019'.Maybe you wanted to say:
select nvl(sum(fgbopal_14_ytd_actv),0) from fgbopal where fgbopal_fund_code = '400002' and ( fgbopal_acct_code between '7000' and '7019' or fgbopal_acct_code between '7046' and '7177' )
The following has nothing to do with your problem, but I got rid of the NVL in the WHERE clause, because NVL (x, '0') will be between "7000' and '7019' (or '7046' and '7177') if and only if x itself is between '7000' and '7019' or between ' 7046 '(and ' 7177')."
If x is a VARCHAR2 (or other string) and you use NVL (for example, WHERE NVL (x, '0') BETWEEN ' 0 'and ' 2999') then don't forget to quote the '0'. The two arguments of NVL should both be of the same type, strings or two numbers.Published by: Frank Kulash, July 12, 2009 12:32
I just saw Michaels response.
Bothnvl (sum (fgbopal_14_ytd_actv), 0)
and
sum (nvl (fgbopal_14_ytd_actv, 0))
will produce the same results. The first way will be a little more efficient, because NVL will not need to be called once.
Published by: Frank Kulash, July 12, 2009 12:54
-
Touch screen not responding is not after the upgrade to the latest version of the software worm with connetivity Kit on my PC.
the Cal turns on and all buttons work, but I can't get the screen to answer. I have reset the Cal and reinstalled the software with the connectivity Kit, but the screen doesn't always react do not... Help
Bob
Hi!, @bigbob50:
If your FIRST HP, have the warranty available, you can call, support Centre and the support oh HP, closer, your home of... http://h30434.www3.HP.com/T5/Android/phone-assistance-in-the-world/TD-p/5038024
-
power-sum with condition group
Hello
I'm fighting with these totals.
I can't understand the syntax <? sum (current - group (/AMOUNT))? > condition AMOUNT > 100.
What I want him to have Total of any amounts that are greater than 100 for example. This 100 is supposed to be variable.
I tried some things that have been proposed in the forum, but all raise error.You can try some thing like that
[100])? >
can you send me your model you use.
E-mail: [email protected]
-
Disable the hyperlink with conditional formatting
Hi experts
I have an analysis of HTML code.
My analysis have different ranks:
Entity link - value
Entity1 - 12
Entite2 - 23
Entity3 - 33
Link entity is a column with a hyperlink or HTML.
I want to deactivate a hyperlink in some entities in my report by using the conditional formatting... but I don't know how I can do this...
The entity column has data Format: @[html]@H so I can see the link instead of html code... but I see links to all the lines...]
In the conditional formatting, I can substitute data Format, but I don't know how to disable the link...
Any help?Hello
To disable a link via CSS, you could use the CSS properties:
pointer-events: none;
cursor: default;However, the first property does not work in Internet Explorer. You can test whether they work in other browsers and check if it fits your requirement.
Thank you
-
Hello
I use oracle 10g
I want to find the net amount after deduction of the amount of debit
Here the CR is DR is positive negative amountdata something like that id code amount 100 CR 500 100 DR 200 100 CR 1000 100 DR 100 200 CR 800 200 DR 100 200 CR 5000 200 DR 100
happen so my net amount after deducting the amount flow and group by id
hope this helps to understand.i tried to get the output from below sql query select id,sum(amount) from XYZ group by id; but how to deduct the debit amount from the total amount
Thank youHello
So, when the code = 'DR', you want to deal with a negative number; Isn't it?
If so, here is one way.
SELECT id , SUM ( CASE WHEN code = 'CR' THEN amount WHEN code = 'DR' THEN -amount END ) AS total_amount FROM xyz GROUP BY id ; ;
I hope that answers your question.
If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and also publish outcomes from these data.
Explain, using specific examples, how you get these results from these data.
Always tell what version of Oracle you are using.Published by: Frank Kulash, 8 June 2012 10:53
-
3.6 numbers broken of calculation of the SUM, what I do now?
as you can see here, whenever I have add a new line, SUM is not updated to include the new line. The nerve of Apple Dim SUM. What should I do now? I've worked like a charm before... Please help
Hi pinkcoder,
Place the formula of TOTAL on a footer line
Kind regards
Ian.
-
Calculation of the sum between two dates
Hello
I had a requirement I need to calculate the total call volume between start and end date in the repository. Can someone help me with logic?
Thank you
Try this
BOX WHEN DATE BETWEEN START_DATE AND END_DATE THEN
END OF COUNT (CALL_VOLUME), 0 OTHERWISE.
Thank you
-
When the clause with conditions
Hi all
I have a report that must be filtered according to user input in a field of text and drop-down list.
The goal is to let the user enter either an exact value (based on the AutoComplete feature) or use the wildcard character %
It is where comes the menu drop down. If they choose value1, AutoComplete, the exact value is used and the where clause would look like something below,
If they choose value2, then where should deal with using the same function and % s. something like:select col1, col2, col3 from table where :P1_FILTER in (select distinct col2 from another_table)
How can I take care of this in 1 where clause? I'm kind of stuck trying to figure out.select col1, col2, col3 from table where :P1_FILTER like (select distinct col2 from another_table)
Thanks for any help.
-ChrisTry this:
select col1, col2, col3 from table where ( :P1_FILTER in (select distinct col2 from another_table) AND :P1_LOV =1 ) OR ( :P1_FILTER like (select distinct col2 from another_table) AND :P1_LOV =2 )
I hope this helps!
Sam -
Where to write the condition in the design of workflows with conditional step?
HelloAgain, I wish BP and workflow with contitional design stage.
I had designed BP and workflow.
As directed by the user for Udesigner guide, I had added trigger before the condition step.
But I do not understand where to set the Condition to test?
If I need to write the condition in triggering elemt itsel... How to proceed?
for example, I want to write the condition as cost of Tota > = 100000, it must follow a path and if fails to another path.
The conditions of triggers are specified in the workflow settings. After you have created a new configuration, open it and click on the settings tab. You will see a tree structure of the workflow with conditional branches. Click a conditional branch to set the parameters for the trigger for this route condition.
-
Hi all
Is there a possible way to cross the join with condition?
I want something like this:
Table A: custid, accu_id, sum
CustID, accu_id unique =
CustomerID amount accu_id
10 25 400
10 35 447
10 29 420
20 30 510
30 35 472
.
.
.
Table b: accu_id, description
accu_id description
shoes 25
Book 29
30 computer
pen 35
Note: in table A, it is a mismatch of the accu_id values that do not use. Please, take into account this.
I want to see all the columns in the TABLE B for each custid in A. TABLE (something like cross join but with ONE article.) The following query does not work.
Select * from a right join B on A.accu_id = B.accu_id;
10-25
10-29
10-30
10-35
20-25
20-29
20-30
20-35
30 25
30 29
30 30
30-35
What should I do for this?
Thanks in advance
Use partition outer join:
with a (too)
Select double union all 10 custid, accu_id 25, amount 400
Select 10,35,447 from all the double union
Select 10,29,420 from all the double union
Select 20,30,510 from all the double union
Select double 30,35,472
),
b like)
Select accu_id 25, "shoe" description of all the double union
Select 29, 'book' from dual union all
Select 30, 'computer' from dual union all
Select 35, 'pen' from dual
)
Select a.custid,
a.accu_id,
a.amount,
b.
a
by (a.custid) partition
right join
b
On a.accu_id = b.accu_id
order of a.custid,
a.accu_id
/
AMOUNT ACCU_ID CUSTID DESCRIPT
---------- ---------- ---------- --------
10 25 400 shoe
10 29 420 book
10 35 447 pen
10 computer
20 30 510 computer
shoe 20
book 20
20 pen
30 35 472 pen
30 shoe
30 bookAMOUNT ACCU_ID CUSTID DESCRIPT
---------- ---------- ---------- --------
30 computer12 selected lines.
SQL >
SY.
-
Calculation of the size of the database.
Salvation of DBA. Which is exactly the way to calculate the size of the database? Is it calculate the sum of the sizes of the segments or the calculation of the sum of the sizes of the redo logs, data files, control files?
You please suggest the correct answer
Thank you
As usual: depends: do you need to calculate the size allocated on storage, you simply go to the current size of the file dba_data_files bytes column data. If you need the storage used the sum of dba_segments fits better. If you need the size of all files used for the database, you must add the controlfiles, newspapers and db_recovery_file_dest_size files.
-
Field of conditional sum with checkboxes
I am creating a total field contingent in a PDF form created by me which will only add cost in total ONLY if the box is checked. Another disadvantage to this is one of the fields (number of monitors), I am eager to multiply by the field notes, which is a field required number on there.
All of them are select___
Here are all the names of FQDN (towards the bottom):
Check the boxes:
- selectiPhone
- selectSwipe
- selectMonitor
- selectDesktop
- selectLaptop
- selectiPadCell
- selectiPad
- selectPhone
Fields costs:
- CostiPhone
- CostSwipe
- CostMonitor
- CostDesktop
- CostLaptop
- CostiPadCell
- CostiPad
- CostPhone
The notes field that will calculate this is "NotesComputer Monitor in notes".
Then add them all in TOTAL COST
Please see below for the screenshot.
The script is the "JavaScript custom calculation" for the field "TOTALCOST.
-
Help with the calculations of the form
I have a form with fields 4R, 4W, 4 p and 4 M. I want the sum of all the numbers in one of these fields and multiply the total by 6 to get 6 (4R + 4W + 4 P + 4 M) how this enter a calculated field? I tried several ways and they simply return 0. Thank you.
Yes, because then you can use the option of rating Simple field integrated and just enter:
(R4 + W4 + P4 + M4) * 6
Maybe you are looking for
-
LabVIEW crashes when connecting to NXT
Whenever I try to connect with the NXT LabVIEW, LabVIEW hangs... I have LabVIEW 2010 and 2011, and it worked until I installed 2011. Can that be my problem? Thank you so much in advance. Alex.
-
Lost Aero Glass after installing KB981322
I use Windows Vista Ultimate Edition and applied yesterdays Patch Tuesday updates security after restarting Aero disappeared and I felt as if I was again finished in the year 2000 and did not like it. I watched Aero questions and found the Aero diagn
-
My screen has rotated 90 degrees and I can't get it back
My screen image rotates 90 degrees when I had an open file on the keyboard and I can't come back to normal
-
computer turns off watching videos or playing games
My computer went off without apparent reason, while playing games online or watch HULU, any idea?
-
Trying to run a program, but can't get half of the page is displayed?
am suppose to follow a course and when trying to watch, only half of the page will be visible on my screen. I only see half of what's going on.