XML data model. Using the SUM() function
HelloI have a data model where I want to create a column of synthesis based on the Group of children.
* < name of group = "G_RO_ESTIMATES" source = "Q_RO_ESTIMATES" >
< element name = "ESTIMATE_TOTAL" value = "G_RO_ESTIMATE_LINES. "CHARGE of" function = "SUM ()" / > "
< name of group = "G_RO_ESTIMATE_LINES" source = "Q_RO_ESTIMATE_LINES" >
< element name = "LOAD" value = "LOAD" / >
< / Group >
< / Group > *.
ESTIMATE_TOTAL returns 0
even if the value of the column LOAD is 760.
I got the function SUM() to work on another group further in my model data, but for some reason, it won't work.
Does anyone have an idea on what is wrong?
Thank you in advance.
Kenneth BR
give the name of the element diff CHARGE_TEST
*
Sometimes the name overlap which results in zero... keep unique names
(I guess I already logged a bug for this return sometimes)
Tags: Business Intelligence
Similar Questions
-
I have two tables: employees and their departments. I'm figuring the total employees by the Department and the total employees of the entire society. I know I have to use the SUM function, but I can only calculate total employees by Department and company separately. I need to get this result:
Published by: user13675672 on January 30, 2011 14:29DEPT_NAME DEPT_TOTAL_SALARY COMPANY_TOTAL_SALARY RESEARCH 10875 29025 SALES 9400 29025 ACCOUNTING 8750 29025 This is my code: SELECT department_name, SUM(salary) as total_salary FROM employee, department WHERE employee.department_id = department.department_id GROUP BY department_name; SELECT SUM(salary) FROM employee; Can somebody help please? Thank you in advance.
Published by: user13675672 on January 30, 2011 14:31Hello
Something like:
SELECT dname, dept_tot_sal, SUM (dept_tot_sal) OVER () comp_tot_sal FROM (SELECT dname, SUM (sal) dept_tot_sal FROM dept, emp WHERE dept.deptno = emp.deptno GROUP BY dname);
There might be a smarter way, with no re - select.
Concerning
PeterAnalytical functions:
http://download.Oracle.com/docs/CD/E11882_01/server.112/e17118/functions004.htm -
Use the stored procedure to create the data model for the bi publisher report
Hi all
Can we use stored procedure to create the data model for BI Publisher reports? I did find an example by using the stored procedure to complete the data model in the bi publisher report.
Thank you
ViratCheck out these links
BI publisher to use the stored procedure
Re: Stored procedures and dynamic columns
Re: Is it possible to use stored procedures in BI Publisher GUI?
Re: PL/SQL stored w / model XML?If brand pls help
-
Using the comparison function where 2 data tables various types
Is it possible to use the comparison function in Labview you to compare 2 arrays of types of different data (e.g. Boolean and double-precision)?
Would this work? Nested for loops of index on the TRUE values of the Boolean table.
-
Difficulty accessing data by using the function of Ago - the end of the previous month
Hey,.
Recently, I met a problem that I can't fix on my own.
I need to compare my portfolio to the current date / specified with the portfolio for intelligence and for the end of the previous month (the last day of the previous month).
It looks like this :
My fact table consists of the list of contracts of loan that is updated daily. The data for the new day are added to the table, which actually resemble a large sandwich of various portfolios.
To recover the data for the current/specified date and intelligence is not a problem. Current date - the date is read (can 10.08.2014), the day before - I use the Ago function (e.g., 09.08.2014).
The real problem is getting the data for the last day of the month previous (e.g. 31.07.2014), since I can't put a specific to the function of Ago offset (10 days in our example), as the number of days from the end of the previous month is constantly - changing is a daily report.
The best solution would be setting the offset function there is a dynamic value, which would change according to the user selects the date of the report. Can be based on the number of days in the month. BI strictly prohibits using anything that is not an integer in the offset value, so this isn't an option.
I tried a work around using formulas in columns, like: FILTER ('facts of agreements'. "" Outstanding "USING ("Posting Date". "" Id of the day ' = TIMESTAMPADD (SQL_TSI_DAY, TIMESTAMPADD (1), (SQL_TSI_DAY, 'Date of Report'.) "Number of the day in the month" *-(1) + 1, DATE ' @{report_date}'))). "
It did not work, since the data I receive are dated the last day of the previous month and date, which is applied to get the data for the current date filter / specified, it cuts.
Tried to create another time the hierarchy, with the ends of period (week, month, quarter, year) and use it as a level at the Ago. He does work in part, offset the end of 1 month, but I can't bind the data, I get to the date of the report, as the Ago function returns random dates.
I tried to search if people have had the same problems and it seems I'm the only one. I'm really desperate at this point, not even sure it's possible to get the result I need everything.
So, please advise!
Aurore
Finally got sorted! Hoorey!
Here's how it's done:
I created a presentation variable 'report_date' for the user to choose the date of the desired report. That this formula has added to the column:
FILTER ('facts of agreements'. "" Outstanding "USING ("facts of agreements". (("" Days late max "> 30))-there is (FILTER ('facts of agreements'. "" Outstanding "USING ("facts of agreements". ((("" Days late max "> 30)), TIMESTAMPDIFF (SQL_TSI_DAY, TIMESTAMPADD (SQL_TSI_DAY, DAYOFMONTH (DATE ' @{report_date}') *-1, DATE ' @{report_date}" "), DATE ' @{report_date}'))
Basically, this formula is used to calculate the difference between the current amount of the portfolio and the amount of portfolio for the last day of the last month (or at the end of last month), where only loans with number of days late over 30 are included.
In the service there, I used a TIMESTAMPDIFF as a compensation formula to calculate the difference in days between the date of the report and the end of last month. Now no matter what date the user chooses it will give the correct difference in days.
Really easy, but it took me a little time to get there.
Hope this helps someone
-
How to use the TRUNC function with dates in the expression builder in OBIEE.
Hello
How to use the TRUNC function with dates in the expression builder in OBIEE.
TRUNC (SYSDATE, 'MM') returns 1 July 2010"where sysdate is July 15, 2010 ' in SQL. I need to use the same in the expression builder in the logical layer mdb column.
Thanks in advanceUse it instead:
TIMESTAMPADD (SQL_TSI_DAY, (DAYOFMONTH (CURRENT_DATE) *-1) + 1, CURRENT_DATE) -
How can I use the Ratio_to_report function in obiee
Hello
I have to use the ratio_to_report function to create the report.
http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/functions124.htm.
This is the link that explains the use of this function. This function calculates the ratio of a value to the sum of a set of values. How can I achieve this in BI
Please help me
Thank you
AngeliqueEnsure that the measure is not shaved base measure, and it is the measure of level of detail...
need more information about your data modeling, how tables are joined and how you aggregate them...
-
How to connect the parallel test using the logarithmic function Teststand database result
Hello
How can I connect a test result of 4 EHR tested in parallel using the logarithmic function Teststand database
I use Labview 2013, 2013 Teststand and sequential model.
The test is performed using a single digital card (SMU-6556). The FSD 4 is connected to the port of the digital map and is tested in parallel.
Currently at the end of the test, I would have a report with all the measures, but I need 4 reports (1 report / dut)
TKS
-
How to use the NVL function in decoding?
Hi all
How to use the NVL function in decoding?
SELECT Decode (Sign (sum (nvl (7), 0)-nvl (sum (5), 0)), - 1, 0, (sum (nvl (7), 0)-nvl (sum (5), 0)) QTY)
of the double
Thank you
You should not do that...
Greatest (NVL (Sum (Quantity), 0)-NVL (SUM (quantity_received), 0), 0) AS qty_arrival
will do the same
HTH
-
I installed lightroom on a new computer (windows 10) cc. I copied all of my original photos on a hard drive and them imported by adding them on the new computer using the import function. I have a catalog to date backed on thehard drive and have tried to insert into the new folder to lightroom. Unfortunately none of my changes, collections etc. seem to be present on the new computer. I still work lightroom with any changes on the old computer where all the photos. Help
He seemed to have solved this problem - the catalogue of the old computer has been saved as a zip file. Once extracted, it could be used as the primary catalog for lightroom on the new computer
-
SQL using the analytic function
Hi allI want a help in the creation of my SQL query to retrieve the data described below:
I have a test of sample table containing data as below:
State ID Desc
MICHAEL 1 T1
ACTIVE 2 T2
T3 3 SUCCESS
DISABLE THE T4 4
The thing I want to do is to select all the lines with an ACTIVE status in the table but is there is no ACTIVE status, my request will give me the last line with MICHAEL status.
I can do this in a single request by using the analytical function for example, if yes can yiu help me on the request of unpacking.
Kind regards
Raluce
Something like that?
I had to fix it.
with testdata until)
Select 1 id, "T1" dsc "DISABLED" status of Union double all the
Select 2 id, 'T2' dsc, the status "ACTIVE" of all the double union
Select id 3, "T3" dsc, the status of 'SUCCESS' of all the double union
Select 4 id, "T4" dsc "DISABLED" status of double
)Select
ID
dsc
status
of testdata
where
status =
-case when (select count (*) in testdata where status = 'ACTIVE') > 0
then 'ACTIVE '.
Another 'DISABLED '.
end
and)
ID in (select id from testdata where status = ' ACTIVE')
or
ID = (select max (id) in testdata when status = 'DISABLED')
)STATE ID DSC
'2' 'T2' 'ACTIVE '.
Maybe it's more efficient
Select
ID
dsc
status
of testdata
where
status =
-case when (select count (*) in testdata where status = 'ACTIVE') > 0
then 'ACTIVE '.
Another 'DISABLED '.
end
and
ID =)
-case when (select count (*) in testdata where status = 'ACTIVE') > 0
then id
on the other
(select max (id) in testdata when status = 'DISABLED')
end
)Post edited by: correction of chris227
Post edited by: chris227
extended -
Hi all
I want to use the function NOW with a different operator in obiee11.1.1.6.11 or 11.1.1.7.1
but every time I have a creating a filter as
TRAN_DATE is equal to NOW()-120, we become "an arithmetic operation is being performed on a non-digital type.»
11.1.16.11 and 11.1.1.7.1
Hare TRAN_DATE is in RPD datetime data type
Can someone tell me how to replace the error and make the report run and return the results
Do now () - 120 is a very simplistic way to look at it because it is highly ambiguous. IE: NOW less 120 "what?" Minutes? Seconds? Years? Petroleum products?
Accuracy is the key. Now() gives a timestamp (a real timestamp DATA TYPE object!), so I guess you mean days.
Timestamp data types are changed (projected through time) using the TIMESTAMPADD function, which in your case would by this formula:
TIMESTAMPADD (SQL_TSI_DAY,-120, NOW()))
-
How to use the NVL function to a parameter with comma delimited values
Gurus,
It is confusing to me. I am trying to use the NVL function, but the setting that I'm passing in my cursor contains multiple values with commas. The NVL function is confused when analyzing the values.
'Where' cursor clause...
and nvl (sn.c_attribute1,'x@#$%') in nvl (p_desig,'x@#$%'( )
translated parameter values...
and nvl (sn.c_attribute1,'x@#$%') in nvl ('SPRT''GOOD' 'BAD' 'x@#$%') -NVL does not parse the value correctly
Any idea on how to get NVL recognize 'x@#$%' , if p_desig is null?
Thank you
Scott
HI, Scott.
Whenever you have a problem, please post a small example data (CREATE TABLE and only relevant columns, INSERT statements) of all the tables involved, so that people who want to help you can recreate the problem and test their ideas.
Also post the results you want from this data, as well as an explanation of how you get these results from these data, with specific examples.
Always say what version of Oracle you are using (for example, 11.2.0.2.0).
See the FAQ forum: https://forums.oracle.com/message/9362002#9362002
My best guess, based on what you posted bone is present, that your problem is discussed in the following:
-
using the R function on the Oracle database
for the use of R, I can only use Oracle data mining algorithms, or I can use the R function as social network in the Oracle database?Could you please be more specific about the R functions/packages you are interested in. The ODM and ore are part of the unique option of OAA.
-
need help to get the value using the REGEXP_REPLACE function.
I am trying to extract the value placed between "< listitems >... < / listitems >" but I am unable to get these value using the REGEXP_REPLACE function.
select REGEXP_REPLACE('<InputParameters></ParamSet><listitems>14545454</listitems></ParamSet></InputParameters>' ,'(<InputParameters>.*<listitems>)(.*)(</listitems>.*<InputParameters>)' ,'\2') from dual;
Can someone please help me achieve this goal.required output: 1454554
Hello
You forgot the / before the last InputParameters. If fix you that, your code will work.
Here is a slightly different way:
SELECT REGEXP_REPLACE ( '
' , '^.*?14545454 (.*?) .*$' , '\1' ) AS listitems FROM dual ;Least to type, the less likely you will have to make typos.
If there are 2 (or more) elements of listitmes, 1 will be returned.From Oracle 11.1, you can also use REGEXP_SUBSTR. I have Oracle 10.2 avaialable now, so I can test the following, but I think you'd say:
SELECT REGEXP_SUBSTR ( '
' , '14545454 (.*?) ' , 1 , 1 , NULL , 1 ) AS listitems FROM dual;When it comes with the text that is or looks to, XML, consider using XML functions.
Maybe you are looking for
-
Windows 7 on ASUS PC - connectivity with router wireless
A few days ago my computer just stopped automatically connected when I connect to the wireless network. The troubleshooter it fixes every time, but if I do not use the internet, it stops again and I have to run again and again and again... Well, you
-
BBM BBM all contacts disappeared after 'Clear data' on Android
Hello I want to spend all my contacts of Xperia to Experia Z2 Z1. I re - install BBM on Z2 and connection I just advise that to close your session just erase the data. So I "(effacer les données om mon Sony Xperia Z1) (setting > apps > BBM)." After t
-
Cannot Ping across the VPN remote access
Hello world I hope I posted this in the right place! I'm a bit new to Cisco IOS, so please forgive me if I ask a stupid question! We have a firewall of 515E PIX 6.3 (4) on which I used the VPN Wizard to set up a remote access VPN the Cisco VPN client
-
Flickering of the screen while the edition of tiff files makes me lose all changes.
When you edit a tiff file it causes my screen flashes, I tried with GPU power on and off and the same behavior, if I am trying to change a slider during this flickering I lose all changes to tiff. I know what is happening to more people as I've seen
-
ATG-short - is there a way to talk to each other the cartridge of managers?
I'm working on ATG 10.2 + short. I have an obligation to load the contents of a folder of detail which is currently examined by the user. For example, say the user seeks to a product, is there a way I can add the spotlight to the page that retrieves