TIMESTAMPDIFF function in OBIEE Answers
Hi experts,
I have a Answers report, where I have included a column and changing the fx formula to find out the time diff ..
TIMESTAMPDIFF(SQL_TSI_DAY, "Bank Transactions - Payor Aging".AccountingDate, "Bank Transactions - Payor Aging".AccountingDate)
here I want the second "Bank Transactions - Payor Aging".AccountingDate to be replaces with any date like as below
TIMESTAMPDIFF(SQL_TSI_DAY, "Bank Transactions - Payor Aging".AccountingDate, '06/02/2010') for June-02-2010.
But, the above date format is working... can any suggest what format I have give here to work.
Thanks in Advance
S
Hi Madan...
Thanks for the quick reply...
I want to continue by next question on top of the TIMESTAMPDIFF function....
TIMESTAMPDIFF(SQL_TSI_DAY, "Bank Transactions - Payor Aging".AccountingDate, TIMESTAMP '2010-06-02 00:00:00')
how can I pass this part of the value from the Dashboard Prompt. I knew that the dashboard prompt can only be created on the presentation column. I can't put any date column in my datawarehouse datamodel as there is already one. I looking if there any other way of passing the second date value from the dashboard prompt.
Thanks in Advance
S
Similar Messages
-
How to use groupby function in OBIEE ANSWERS ???
Hi ,
I need to find TOP 1000 client names on each product and I need to group the data by product. I am unable to group the data in Answers , I dont have access to the repository.
I used the Top function but unable to group the data. Please help me...Why didn't using TOP work for you? What kind of results did you get?
I can also suggest using custom ColumnCount with RSUM () in it, applying filter RSUM()<=1000, and sorting by product amount DESC
and definitely your column order should be something like this - product group, client, product_amt, rowcount (you can actually remove this once you create filter for it) -
Hi All,
I tried using Evaluate and Evaluate_Aggr in the column formula of a report.
Evaluate_Aggr() is erroring saying the dimension Work Order is incorrectlly defines logical Table Source Mapping for a dimension of Work Order. If I revoke the implicit fact coniguration on this Subject Area which I have, the report executes as expected. But this implicit configuration is required in my scenario for other reports to work.
Using Evaluate() works perfectly.
Can anyone help me in fixing this?
Shld I add any other configuration in the RPD to resolve this issue?
Thanks996933 wrote:
hi all
i got this error when i try to execute evaluate function in obiee answer
nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <(>: Syntax error [nQSError: 26012] . (HY000)
SQL Issued: SELECT DGN_TIME_RES_USAGE_CUBE.DRTCLN_WO_NO, DGN_TIME_RES_USAGE_CUBE.HOURS, DGN_TIME_RES_USAGE_CUBE.PROJ_NO, EVALUATE('FUNC_FIND_EMPLOYEE_DESC(%1,%2,%3)','KASA',DGN_TIME_RES_USAGE_CUBE.DRTCHD_EMP_ID,1), RMAX(DGN_TIME_RES_USAGE_CUBE.DRTCHD_DATE), RMIN(DGN_TIME_RES_USAGE_CUBE.DRTCHD_DATE) FROM LIVE2 years back post from the next time open new thread ? (Business Intelligence Suite Enterprise Edition )
Thanks,
Saichand -
OBIEE Answers functionality questions
Hi,
I pretty new to OBIEE Answers orginally working with Business Objects XI Webi, I have read through the user guides for Answers but some functionality I would like thats in BO XI but doesnt seem to be avaliable in Answers, Im not sure if its not documented because its more advanced functionality or whether Answers just can't do it ? Is the following functionality avaliable in Answers,
1. I want to build a report based on 2 queries and then link the data in these queries by a common dimension and display this data in 1 report, for example I have query 1 with fields A,B,C and query 2 with fields A, D, E, I want to link on field A as its common and in the 1 report display the fields A,B,C,D,E
is this possible ? This is not the same as union / intersect, and is not the same as dashboard showing two query results, I want 1 table showing the results of two queries.
2. Once you have you data set returned is there anyway to filter on the data displayed in the report without the SQL actually having the filter in ? For example I have 1 query returning 100 rows of data and in that 50 rows are of type = A and 50 are of type = B. I dont want to have two seperate queries one to get all type A and one to get all type B, but I would prefer to return all rows in the query then filter the results in the report itself so I can have 1 report table showing type = A and 1 report table showing type = B, pretty much like how you can add a filter in Excel or again how you would add a report level filter in BO XI ?
Edited by: RichRich on 01-Feb-2010 02:41
Edited by: RichRich on 01-Feb-2010 02:41
Edited by: RichRich on 01-Feb-2010 02:42HI,
May I know obiee version?
Can you refer below thread, it sees similar error.
https://forums.oracle.com/message/9866218
https://forums.oracle.com/message/10091143
Thanks,
Satya -
OBIEE timestampdiff function syntax error
Hi all,
I am getting an error while applying timestampdiff function .help me to sort it out.
TIMESTAMPDIFF(SQL_TSI_DAY,"- Sanction and Disbursment"."Value Date" , VALUEOF(NQ_SESSION.VAR_CAL_CURR_DATE))
error details
Formula syntax is invalid.
[nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 22025] Function TimestampDiff is called with an incompatible type.Please have your System Administrator look at the log for more details on this error. (HY000)
SQL Issued: SELECT TIMESTAMPDIFF(SQL_TSI_DAY,"- Sanction and Disbursment"."Value Date" , VALUEOF(NQ_SESSION.VAR_CAL_CURR_DATE)) FROM "SIDBI Master"Aswin,
Syntax looks to be fine but before applying it here can you check if both these 2 parameters returns date in same format:
"- Sanction and Disbursment"."Value Date" = 08/21/2011 (No Timestamp)
VALUEOF(NQ_SESSION.VAR_CAL_CURR_DATE) = 08/21/2011 (No Timestamp)
Both shud have same format.
Also, try this for verification
TIMESTAMPDIFF(SQL_TSI_DAY,"- Sanction and Disbursment"."Value Date" , CURRENT_DATE)
Hope this helps -
Converting Decode function in OBIEE
Hi Guru's
we are converting some BO reports to OBIEE and need to convert Decode function
Below is the Decode function they are using:
Decode ( sign(nvl(BOOKINGS_DATA_UDTC.qty_shipped,0)), 0,decode(BOOKINGS_DATA_UDTC.DELIVERY_NUMBER, 0,decode(BOOKINGS_DATA_UDTC.Schd_Ship_date_fk,to_date('1/1/1990','mm/dd/yyyy'),'Next Month Backlog',decode(sign(nvl(BOOKINGS_DATA_UDTC.Schd_Ship_date_fk, '01-JAN-90') -PAR.PAR_DATE), 1, 'Next Month Backlog', 'Current month will ship')) ,'Awaiting for collection') ,'MTD Shipped')
i have tried converting into case :
case when sign(IFNULL("BOOKINGS_DATA_UDTC"."Qty Shipped",0)) = 0 then (case when "BOOKINGS_DATA_UDTC"."Delivery Number" = 0 then (case when "BOOKINGS_DATA_UDTC"."SCHD_SHIP_DATE_FK" = '01-JAN-1990' then 'Next Month Backlog' else (case when Timestampdiff(SQL_TSI_DAY, cast('@{ParDate}{28-DEC-2012}' as Date),(case when "BOOKINGS_DATA_UDTC"."SCHD_SHIP_DATE_FK" IS NULL then CAst('01-JAN-1990' as DATE) else "BOOKINGS_DATA_UDTC"."SCHD_SHIP_DATE_FK" end)) > 1 then 'Next Month Backlog' else 'Current Month Will Ship' end) end) else 'Awaiting For Collection' end) else 'MTD Shipped' end
But it is not workign as expected.
Can some one please help me with this.
Thanks,you can achieve it by using CASE WHEN condition END function in obiee. nested case also supported by obiee.
check the below link Decode Join Condition in OBIEE RPD
Thanks
Jay.
Edited by: Jay on Apr 3, 2012 12:56 PM -
Percentile_Disc Function in OBIEE 10g - Help needed at the earliest
Hi All,
I have a requirement of using PERCENTILE_DISC function in OBIEE 10g repository. I tried NTile function, to fetch the percentile. But that is not what am intending to see.
I have a requirement something similar to this, to be implemented in repository. Could anyone throw some light in this regard?
PERCENTILE_DISC(.25) WITHIN GROUP (ORDER BY F.Days asc) OVER (PARTITION BY A.NAME, B.PLACE)
Here F = Fact
A = 1st Dimension
B = 2nd Dimension
Days = Is calculated as TIMESTAMPDIFF(SQL_TSI_DAY, A.DATE, B.DATE). Established Inner Join, to fetch this calculation in to the FACT
Appreciate your responses at the earliest. Thanks once again.
Regards,
Sarat NallapatiHi,
I don't have any idea on percentile_disc.
But,in OBIEE we have a function PERCENTILE()
It will give the percentage of each value in the total sum of all the values.
once check it.
Regards,
Lakshmipathi. -
Applying decode function in obiee 11g
DECODE(A.AC_CCY,'INR',DECODE(DRCR_IND,'D',-1,1)*A.LCY_AMOUNT,DECODE(DRCR_IND,'D',-1,1)*A.FCY_AMOUNT),
DECODE(DRCR_IND,'D',-1,1)*A.LCY_AMOUNT,
Can any one help me how to decode the above sql statement in obiee 11g.
Edited by: 925104 on Apr 3, 2012 12:48 AMyou can achieve it by using CASE WHEN condition END function in obiee. nested case also supported by obiee.
check the below link Decode Join Condition in OBIEE RPD
Thanks
Jay.
Edited by: Jay on Apr 3, 2012 12:56 PM -
How to use Table valued MSSQL function in OBIEE
Hi all,
Can some one help me to understand how to use table valued function in OBIEE? I want to use a table valued function (MSSQL function, with some input parameter), in the physical layer to pull the data?
I know for MSSQL Stored Procedure we can write as
EXEC SP_NAME @Parameter = 'VLUEOF(NQ_SESSION.Variablename)'
but now I have a table valued function in the query window I can get the data as
select * from myfunction(parametervalue)
In physical layer of OBIEE I have tried as
select * from myfunction('VLUEOF(NQ_SESSION.Variablename)'), but I'm getting error as the NQ_SESSION variable doesn't have a value , but actually I have initialized the variable but still Im getting error.
Can some one help me to solve this.
Thanks,
MithunFollow this link and try yourself. let me know for issues
Substring instr issue in obiee
Appreciate if you mark
Edited by: Srini VEERAVALLI on Feb 20, 2013 8:13 AM -
Issues with integrating Java script functions in OBIEE 11G
Hello experts..
I am trying to integrate some Javascript functions in my OBIEE 11G Dashboard..
I have modified the original common.js file and renamed it as insight_common.js in the following directory (backed up the original file of course)
OBIEE 11G Folder/user_projects/domains/bifoundation_domain/servers/bi_server1/tmp/_WL_user/analytics_11.1.1/7dezjl/war/res/b_mozilla/insight_common.js
In my dashboard, I have a dashboard object as text component where I have checked 'Contains HTML Markup'. I have written the following code:
hello
<script src="/res/b_mozilla/insight_common.js" type="text/javascript"></script>
<script type="text/javascript">
sayHi();
</script>
However, when I launch the dashboard, it is not working.
In the Google Chrome browser as I inspected the element to investigate the reason, I am getting the following error under 'console'
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost/res/b_mozilla/insight_common.js
Uncaught ReferenceError: sayHi is not defined saw.dll:611
It seems that OBIEE is not recognizing the new file that I made..
Is there a way around this?
ThanksSrini
I don't have backgrounds in coding, so a lot of what I wrote came from my own researching...
Now I have tried your latest suggestions again as the below:
1.<script type="text/javascript" src="res/b_mozilla/insight_common.js">
sayHi();
</script>
and
2.
<script type="text/javascript" src="res/test.js"></script> ----- in my case: <script type="text/javascript" src="res/b_mozilla/is_common,js"></script>
Now both codes this time do not yield any outputs when launching the dashboard. The section is blank and the preview of the Text section in the dashboard is blank as well..
So, are you sure these are all the steps I need to take to call javascript function in OBIEE?
Do I need to define anything in weblogic or other places?
I hope I am not missing any steps..
Thanks and let me know.. -
Use EVALUATE function in obiee
Hi ALL
i hv a database query like this;
select
deptno,
rtrim (xmlagg (xmlelement (e, ename || ',')).extract ('//text()'), ',') enamesfrom
emp
group by
deptno;
now, i want to use this using Evaluate function in obiee column formula.
thn how to do it.
Please reply.
THX
SAPHello SAP,
I have seen you for sometime and one thing I came to know is you are creating threads and once you got your solution or you dont feel to follow up you are just leaving the thread.
see few here,
Sorting month name
Drill down problem
Re: Filter in Union Request
so please better close the threads which are answered and proceed further. -
Dense Lookup Function in OBIEE
Hi ,
Can someone please explain the syntax of Dense Lookup Function in OBIEE.
The function in the built-in RPD is using too many arguments and I am not able to understand it.
Thanks in Advance for the help.
AkshathaI had actually seen all those links. Thanks for your time although.
Actually, I have an expression like this.
lookup( DENSE LookupTable.DOMAIN_MEMBER_NAME, 'MCAT', 'CMP' || '~' || Table_A.TOP_LVL_PRODCAT_ID, VALUEOF(NQ_SESSION.USER_LANGUAGE_CODE), Table_A.DATASOURCE_NUM_ID)
I am not sure of what 'MCAT' and 'CMP' is here?
Is the || the concatenation operator?
Can you please explain this expression?
I hope I am not asking too much here :/
Akshatha -
How to use CHOOSE function in OBIEE
Hi,
Could any one help me out in using the choose function in OBIEE.
How can a column be restricted using the choose function, when different users belonging to different groups logs in.
RakeshIt seems be obvious that you should not publish reports to users and groups who are not allowed to see the columns in the report,
but in practice it can be very challenging to oversee this, especially when you have a lot of groups and a very strict security model....or "unsurmountable" and unchangeable "business requirements" ;-)
Testing definitely is the crucial point. And when you start going nuts with column access rights plus column selectors, dynamic view switching, guided nav., dynamic column formulae etc. etc. the fun really begins. -
Unable to use WriteBack function in OBIEE on a Unix setup
Hi All
I am trying to implement the writeBack function in OBIEE. We have OBIEE installed on a Unix machine. Below is the xml that I have writte, it keeps erroring stating that the xml file cannot be read.
<?xml version="1.0" encoding="utf-8" ?>
<WebMessageTables xmlns:sawnm="com.siebel.analytics.web/message/v1">
<WebMessageTable lang="en-us" system="WriteBack" table="Messages">
<WebMessage name="forecast">
<XML>
<writeBack connectionPool="MOM_BI">
<Insert></Insert>
<Update>UPDATE STORE SET STORE_NAME='{@c1}' WHERE STORE={@c0}</Update>
<postUpdate>COMMIT</postUpdate>
</writeBack>
</XML>
</WebMessage>
</WebMessageTable>
</WebMessageTables>
Below is the log that I've received from OBIEE:
Error loading XML Message File (/app/oracle/product/OBIEE10133/OracleBI/web/msgdb/CustomMessages/forecast.xml): Sax parser returned an exception.
Message: Invalid document structure, Entity publicId: /app/oracle/product/OBIEE10133/OracleBI/web/msgdb/CustomMessages/forecast.xml, Entity systemId: , Line number: 2, Column number: 1^M
Error Codes: UH6MBRBC^M
Could you please let me know what is wrong with my xml file? By the way I only want to do an update to my table. Also I have followed all the examples from Venkat and others but I stil cannot get it to work.
Regards
AdnanIt's already good to know that the file gets picked up.
What I don't understand: "The log files are not being updated with the error however when I re-save my Answer it is populating the log file to state that the object already existed."?
I had to put a fake "insert" statement to get it working once. Here's the example:
<?xml version="1.0" encoding="utf-8"?>
<WebMessageTables xmlns:sawm="com.siebel.analytics.web/message/v1">
<WebMessageTable lang="en-us" system="WriteBack" table="Messages">
<WebMessage name="ELT_Upside">
<XML>
<writeBack connectionPool="ELT_Writeback_Pool">
<update> UPDATE T_DW_LOGIC_ELT_UPSIDE SET COMMENTS='@{c0}', AMOUNT=@{c1}, LAST_UPDATED_BY='@{c6}', LAST_UPDATE_DATE=TO_TIMESTAMP('@{c7}', 'YYYY-MM-DD HH24:MI:SS.FF3') where UPSIDE_COMMENT_ID=@{c2} </update>
<insert> UPDATE T_DW_LOGIC_ELT_UPSIDE SET COMMENTS='@{c0}', AMOUNT=@{c1}, LAST_UPDATED_BY='@{c6}', LAST_UPDATE_DATE=TO_TIMESTAMP('@{c7}', 'YYYY-MM-DD HH24:MI:SS.FF3') where UPSIDE_COMMENT_ID=@{c2} </insert>
</writeBack>
</XML>
</WebMessage>
<WebMessage name="ELT_Downside">
<XML>
<writeBack connectionPool="ELT_Writeback_Pool">
<update> UPDATE T_DW_LOGIC_ELT_DOWNSIDE SET COMMENTS='@{c0}', AMOUNT=@{c1}, LAST_UPDATED_BY='@{c6}', LAST_UPDATE_DATE=TO_TIMESTAMP('@{c7}', 'YYYY-MM-DD HH24:MI:SS.FF3') where DOWNSIDE_COMMENT_ID=@{c2} </update>
<insert> UPDATE T_DW_LOGIC_ELT_DOWNSIDE SET COMMENTS='@{c0}', AMOUNT=@{c1}, LAST_UPDATED_BY='@{c6}', LAST_UPDATE_DATE=TO_TIMESTAMP('@{c7}', 'YYYY-MM-DD HH24:MI:SS.FF3') where DOWNSIDE_COMMENT_ID=@{c2} </insert>
</writeBack>
</XML>
</WebMessage>
<WebMessage name="ELT_Outlook">
<XML>
<writeBack connectionPool="ELT_Writeback_Pool">
<update> UPDATE T_DW_LOGIC_ELT_OUTLOOK SET AMOUNT=@{c4}, LAST_UPDATED_BY='@{c6}', LAST_UPDATE_DATE=TO_TIMESTAMP('@{c7}', 'YYYY-MM-DD HH24:MI:SS.FF3') where OUTLOOK_COMMENT_ID=@{c0} </update>
<insert> UPDATE T_DW_LOGIC_ELT_OUTLOOK SET AMOUNT=@{c4}, LAST_UPDATED_BY='@{c6}', LAST_UPDATE_DATE=TO_TIMESTAMP('@{c7}', 'YYYY-MM-DD HH24:MI:SS.FF3') where OUTLOOK_COMMENT_ID=@{c0} </insert>
</writeBack>
</XML>
</WebMessage>
</WebMessageTable>
</WebMessageTables>
Cheers,
C. -
About the filter function in OBIEE 11g
Hi, all.
when i use the filter function in OBIEE 11g, it turn out a wrong result.
The operation steps and detail are described as follow:
1. In the Column Formula pane, I typed the Formula of the column 'count of customer' as:
FILTER(count(distinct("customer info dimesion"."customerID")) USING ("TradeType Dimesion"."TradeType" = '001'))
2. But the phisical SQL about this column in the NQquery file is that: "count(distinct(T11520.CUSTOMERID)) as c5, "
which means that, the filter wasn't applied, right?
If so, what shall I do in this situation, in other words , how can i make a Condition COUNT?
Any Suggestion is appreciated!
Thank you in advance~~O(∩_∩)O~Hi katherine,
FILTER(count(distinct("customer info dimesion"."customerID")) USING ("TradeType Dimesion"."TradeType" = '001'))I think your formula there is mistake like many braces...instead type this in your f(x)
=>Filter(count(distinct customer_id) USING trade type='001')
This filter function is same like a case statement,if you filter still gives error write a case statement
CASE WHEN TradeType Dimesion.TradeType='001' THEN count(distinct customer info dimesion.customerID) ELSE 0 END
Will it be helpful?,follow this etiquette http://forums.oracle.com/forums/ann.jspa?annID=939
By,
KK
Maybe you are looking for
-
How do I restore tab behavior back to the way it was in FF 3.5??
I just upgraded to FF 3.6.13, I generally wait to upgrade until any new bugs have been identified and corrected. In FF 3.5, when I opened a new tab from a link, the new tab appeared to the right of the current tab (NOT at the very end of the tab bar)
-
Envy 15 - No audio able to be heard, despite volume mixer showing activity.
I have a HP ENVY 15 Notebook PC (LW897AV), running Windows 7 Home Premium 64-bit Service Pack 1. It is only a little over a year old as I got it in June 2012, so is still under warranty. Obviously I'd rather not send it back in if I don't have to.
-
Why is the excellent hp-15c emulator, sci-15c, which I purchased years ago, missing from my ios upgraded ipad and not shown in my purchased apps nor in the store? The app did get properly reatored to my other ipad 2 and 3 and iphone 4s Thanks in adva
-
Why is there such a difference in my free space between my iPod Touch and my iPad (3) as indicated below: iPod iPad Songs 1,107 774 Videos 18 30 Photos
-
The Mysteries of Registration Points
Hello All! So, I'm starting to feel like Seinfeld: Registration Points... What is the deal with those? Am I right? Every time I try and educate myself about these things, they get all mixed in with Transformation Points, the Info Panel, Convert to Sy