Variable or Filter
I want a report where a cunstomer name is selected and results based on it should be displayed, So the best way is to Create a Variable or use it in the filter section?
if the user has to select a value for customer, you need to have a variable on customer.
Now coming where you need to place it, depends on the requirement. If you need to display the customer in the report, you need to include that in the row section along with the variable. If the user doesnt need it in the initial report but woudl liek to have it for drill down purposes, you need to put it in free chars.
Similar Messages
-
Issue in using presentation variable as filter condition in the reports
Hi,
I have an issue in using presentation variable as filter condition in my reports the details are as follows:
Details :
We want to implement the Max and Min variables through Presentation variables only.we do not want to implement it through session variables in this case.
We have two variables MIN and MAX to be used as Presentation Variables,for a column of the report (which is a quantity),so that the user wants to see the data for this column within a particular range.i.e the Min and the Max.This part has been implemented well . The issue is when the user wants to see the full data.In that case we will not pass any values to these two Presentation Variable or in other words we are not restricting the report data so we are not passing any value to the variables,this is when the report is throwing the error. we want to leave this variables blank in that case.but this is giving error.
Please suggest how can I overcome this issue.
Thanks in Advance.
Regards,
Praveeni think you have to use guided navigation for this. create two reports first is the one you are having currently and second is the one in which remove the presentation variable from the column formula. i.e. the same report with no aggregation applied.
Now create a dummy report and make it return value only when the presentation variable value is not equal to max or min. guide the report to navigate between the first and second report based on the result of the dummy report. -
Variable within Filter expression will not parse -Seems to be corrupted
ODI 10.3.4.0
I defined a Variable TTE_BU of type "Alphanumeric", Default Value = the select query:in (SELECT BUSINESS_UNIT FROM PS_S1_ODI_LEARNING)
I use this variable as a package variable to filter table source data
When I run the package The package errors out with the message:
911 : 42000 : java.sql.SQLException: ORA-00911: invalid character
java.sql.SQLException: ORA-00911: invalid character
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
If I create another variable with another name but with the same SQL query the package runs OK.
Has anyone ever solved tthis king of error?Solved the problem by doing a delete in the ODI repository.
DELETE FROM SNP_VAR_DATA WHERE VAR_NAME = 'TTE_BU'
I would be thankful to anyone who can explain the purpose of this table. -
How to use the date repository variable in filter expression
Hi Gurus
I am getting error in using the date repository variable in Filter expression. I am using the below formula
filter( Fact.calls USING "Dim Time"."Fiscal Month End Date" = VALUEOF("month_start") )
I am getting below error
Formula syntax is invalid.
[nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 22024] A comparison is being carried out between non-compatible types. (HY000)
SQL Issued: SELECT filter( fact.Calls using "Dim Time"."Fiscal Month End Date" =VALUEOF("month_start")) FROM "Call Data"
Then i tryed the below format i am getting still the error
filter( Fact.calls USING "Dim Time"."Fiscal Month End Date" = DATE'(VALUEOF("month_start"))' )
Formula syntax is invalid.
[nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 46047] Datetime value (VALUEOF("month_start")) from (VALUEOF("month_start")) does not match the specified format. (HY000)
SQL Issued: SELECT filter( Fact.Calls using "Dim Time"."Fiscal Month End Date" =DATE'(VALUEOF("month_start"))') FROM "Call Data"
Please let me know what i am missing or what is the correct syntax for fitler using the date repository variable.
Thanks in advance
Regards
@liHi @li,
Syntax-1 is fine it will work,What kind of Variable is it?
Static or Dynamic
Thanks, -
Error in using a variable in filter condition in an Interface
Hi All,
I am using a variable in my interface in a filter condition. I have an EMP table of scott schema and want to pull all the records wiht hiredate date lying between 2 dates, incremental pull.For this I have created 2 variables and using them in the filter condition. I am getting an error inthe interface when I run in a package after declaring and refresing the variables.
com.sunopsis.sql.SnpsMissingParametersException: Missing parameter
at com.sunopsis.sql.SnpsQuery.completeHostVariable(SnpsQuery.java)
at com.sunopsis.sql.SnpsQuery.updateExecStatement(SnpsQuery.java)
at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execStdOrders(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.i(e.java)
at com.sunopsis.dwg.cmd.g.y(g.java)
at com.sunopsis.dwg.cmd.e.run(e.java)
at java.lang.Thread.run(Unknown Source)
Regards,
KrishnaHi Krishna,
What is the datatype of the Variable lastupdate ?
In my case
Variable
Name : LastUpdateDate
Datatype : Alphanumeric
Action : Historize
Query : select to_char(to_date(sysdate,'DD-MON-YY'),'DD-MON-YY') from sys.dual
Then in filter I used
EMP.HIREDATE>to_date('#LastUpdateDate','DD-MON-YY')
Thanks
Sutirtha -
Session Variable in filter view error
Hello,
My prompt is defaulted to current 12Weeks. I used session variable in the prompt to capture 12 Weeks (Current Week and Current+12).
so the default value is @{biServer.variables['NQ_SESSION.PERIOD_STDATE']} where PERIOD_STDATE is my session varible.
I am using a filter view to display the filters being applied.
When the user opens a tab, the filter view is throwing error
***The syntax of the expression to be evaluated is invalid.***
***Expression: @{biServer.variables['NQ_SESSION.PERIOD_STDATE']}***
My report is running fine. I just have the date column as prompted in my report request.
When the user hits go button on the prompt then the filter view comes up just fine.
What is that I am doing wrong? Why does the filter view gives result after hitting GO button?
Please help.
thanks,
deepHi,
1. Set the default using logical SQL. Select <presentation table>.<presentation column> from <subject area> where <presentation table>.<presentationation column> =valueof(NQ_SESSION.<session variable>)
2. You dont have to write the exact syntax for entering the session variable in the default values. You just need to use the session variable name after selecting the session variable type in the drop down.
Hope this helped/ answered.
Regards
MuRam -
Using Variable within Filter expression will not parse.
IN ODI 11.1.1.3.0, I defined a Variable (SelectionDate) of type "Alphanumeric", Default Value = 01-JAN-1970 with the select query: select to_char( SYSDATE , 'DD-MON-YYYY') from dual.
I intend to use this variable as a scenario variable (parameter) that receives a value in the form of 'DD-MON-YYYY', from the execution environment.
I refreshed the variable and it received the value 16-JUN-2011 (today's date). So far so good.
I then defined an Interface and used the variable in a filter expression:
Active Filter: Checked
Implementation Tab:
SOURCE_VIEW.SELECTION_DATE BETWEEN TO_DATE('#PROJECT1.SelectionDate', 'DD-MON-YYYY') AND (TO_DATE('#PROJECT1.SelectionDate', 'DD-MON-YYYY') + 1)
Execute on :Source
When verifying the expression (click on the checkmark in the implementation tab) I always get: Expression is not valid for this DBMS. java.sql.SQLDataException: ORA-01858: a non-numeric character was found where a numeric was expected.
I cannot get the filter to parse. Thank you for your ideas of what might be wrong.
Jose.Yes, it worked when placed in the package.
I think the expression editor is sending the string as it is written to the database in order to parse it, without replaceing the #variable for the actual value. Anyway thanks.
Jose -
How to use a presentation variable in filter conditions
Hi,
I have set a presentation variable "day" on my dashboard prompt containing a date column. I now need to use this presentation variable in the filter clause to restrict the dates between "day" and sysdate.
So i apply the following SQL filter:
where day between '{@variables.day}' and current_date
But I end up in getting the following error:
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 1861, message: ORA-01861: literal does not match format string at OCI call OCIStmtExecute. [nQSError: 17011] SQL statement execution failed. (HY000)
I even tried casting the presentation variable to date, but to no avail. Can someone let me know how to specify the date format for the presentation variable.If you're a member of ODTUG (or even if not, you can sign up for an associate membership for free) you can download Glenn's presentation from 2009 Kaliedoscope "Little Used Features of Essbase (Like Data Mining and Triggers)" -- there is a section in that presentation on substitution variables -- he does a really good job in showing how this works.
Go to: www.odtug.com, then Tech Resources, then Essbase/Hyperion, and search for Schwartzberg. Currently it's the ninth presentation on the list -- I think this changes based on popularity of downloads.
Regards,
Cameron Lackpour -
Using Prsentation variable as filter error"None of the fact source are comp
Hi
I am capturing two date presentation variables SDATE and EDATE using calendar picker and i have a field for expected date which should be between the dates captured so the column formulas here are like
"CASE WHEN CASE WHEN '@{SDATE}' IS NULL THEN CURRENT_DATE ELSE CAST('date'||' '|| CHAR(39)||RIGHT('@{SDATE}',4)||'-'||LEFT('@{SDATE}',LOCATE('/','@{SDATE}')-1)||'-'||SUBSTRING('@{SDATE}'FROM LOCATE('/','@{SDATE}')+1 FOR LOCATE('/','@{SDATE}',LOCATE('/','@{SDATE}')+1)-LOCATE('/','@{SDATE}')-1 )||CHAR(39) AS DATE) END<CAST("- Opportunity Custom Attributes".DATE_25 AS DATE) THEN 1 ELSE 0 END"
"CASE WHEN CASE WHEN '@{EDATE}' IS NULL THEN CURRENT_DATE ELSE
CAST('date'||' '|| CHAR(39)||RIGHT('@{EDATE}',4)||'-'||LEFT('@{EDATE}',LOCATE('/','@{EDATE}')-1)||'-'||SUBSTRING('@{EDATE}'FROM LOCATE('/','@{EDATE}')+1 FOR LOCATE('/','@{EDATE}',LOCATE('/','@{EDATE}')+1)-LOCATE('/','@{EDATE}')-1 )||CHAR(39) AS DATE) END >=CAST("- Opportunity Custom Attributes".DATE_25 AS DATE) THEN 1 ELSE 0 END"
I am able to see the value 1 or 0 as per the formulas but now if i apply filter on these above columns say =1 or = 0 then as soon as i run dashboard it throws error as
"ORA-01841: (full) year must be between -4713 and +9999, and not be 0 at OCI call OCIStmtExecute" as in when there is no value for presentation variable.
If i pass some value in prompt then reports works fine.
Any thoughts will be really helpful.Just add a default value into the prompt.
If the default is really complicated then you might have to use SQL to get the default value you want. It's tricky but here's an example of one I've used that defaults the first day of the year:
SELECT date from "Lead Analysis" where date = TIMESTAMPADD(SQL_TSI_MONTH,-MONTH(current_date)+1,TIMESTAMPADD(SQL_TSI_DAY,-DAY(current_date)+1,current_date)) -
Customer Exit variable and Filter routine in DTP does not works?
Hello Experts,
Does anyone know what might be the possible reason - A customer exit variable working fine on the OLAP side does not work in a DTP??
I have also tried to use the Filter routine, which does not give me the right results..I am trying to fetch a Fiscalyear period maintained in an infoObject as follows in my Filter routine..
ata: sel_period like /BIC/PZPARAM-/BIC/ZPARAMVAL.
DATA: zperiod type /BI0/OIFISCPER.
SELECT SINGLE /BIC/ZPARAMVAL INTO sel_period
FROM /BIC/PZPARAM
WHERE /BIC/ZPARAM = 'ZPCA'
AND objvers = 'A'.
zperiod = sel_period.
data: l_idx like sy-tabix.
read table l_t_range with key
fieldname = 'FISCPER'.
l_idx = sy-tabix.
l_t_range-iobjnm = '0FISCPER'.
l_t_range-fieldname = 'FISCPER'.
l_t_range-sign = 'I'.
l_t_range-option = 'EQ'.
l_t_range-low = zperiod.
if l_idx <> 0.
modify l_t_range index l_idx.
else.
append l_t_range.
endif.
p_subrc = 0.
Please let me know if I am making any mistakes above..
Kind Regards,
KadriksHi
1. CLEAR l_t_range-high. is missing in your code befor assigning values to l_t_range.
2. use simple append l_t_range after the l_t_range asisgnments. remove below code :
if l_idx 0.
modify l_t_range index l_idx.
else.
append l_t_range.
endif.
p_subrc = 0.
3. I dont think you need to assign infoobject.
4. Clear sel_period and zperiod is also missing
Hence your code should be :
data: l_idx like sy-tabix.
read table l_t_range with key
fieldname = 'FISCPER'.
CLEAR l_t_range-high.
l_idx = sy-tabix.
l_t_range-fieldname = 'FISCPER'.
l_t_range-sign = 'I'.
l_t_range-option = 'EQ'.
l_t_range-low = zperiod.
append l_t_range . -
APD with date variable in filter object
Have an APD with a filter object. The filter uses a range for 0CALDAY. the range includes a variable (customer_exit) whic calculates the date of previous fiscal period-end date. Works perfectly in Bex.
However, when running the APD, the date format comes out as YYYY/MM/DD, and 0CALDAY is expecting MM/DD/YYYY.
How can I get the internal format of the date correct? I get no errors in the APD, however the date format causes incorrect results, as if no date was entered.
Any suggestions?
PS. actually, the internal date format used by the APD for my variable ZCE_PREVPER_END is:
ZCE_PREVPER_END = '20101001'
Needs to be 10/01/2010....
Edited by: JoeC on Oct 27, 2010 11:39 PMHi Jordan,
I would suggest several options.
First, you have the option within Webi to display only the date and not the time (right click on the object on the report, or go to field properties, and change the format of the display).
If you are using this value in comparisons in the report, you must make sure the format matches. Try changing the format within the variable to be the same as what you are comparing it to. If that is still not working, let me know. It may still just be a syntax or data type/format error.
Thanks -
OLAP Variable for Filter Selections in DTP
Hi
In BI 7.0 DTP i am using a ZZ OLAP Variable for a Filter on Location.
How/Where i can check the values defined for that OLAP Variable and if i want to update that selection with few new values
ThanksHi,
Please check the threads below:
Re: Infopackage - ABAP routine or OLAP variable
Re: How to create OLAP Variable in DEV
Re: Infopackage - ABAP routine or OLAP variable
Re: creation of OLAP Variable
-Vikram -
Showing a variable as filter in a jump beween 2 queries
Dear experts,
I've did a jump between 2 queries and I'm working on the Web Application Designer of SAP 3.x. So I need to show the input variable (which was introduced in the query 1) as a variable of one characteristic in a target query. That variable must also act as the filter of the target query .
In conclusion, an input variable of the query 1 must be saw as a variable of one characteristic in target query and it must be a filter of this target query as well.
Thank you in advance
JorgeHi Jorge,
Create an input variable for say "Calday" and this object should be common i.e avaliable in both the reports.
In the Assigments in RSBBS define this Calday as DELETE instead of Generic.
When you execute the report right click on the Calday and Execute it will take u to next report based on Calday,hence Calday will act as filter and an input variable to the next report !!!!!!!
if this is not the requirement then pl explain with an Example !!!!!!!!!
Try this !!!!!!
SVU123
Edited by: svu123 on Feb 10, 2009 7:58 PM -
Hi,
I have an Aggregat with a Filter F1. This Filter has also a Variable.
For this selected data I have a planing function in BEx Analyzer. Unfortunately i have no idea how i can pass a value for the variable in order to restrict my aggregat by the filter.
In addition i dont want to use a analysis item all i want to use is a button, which can be pressed by the user.
Normally is use VAR_NAME and VAR_VALUE when i have a Variable in the planning function. But in this case the variable is in the filter and these above parameters don't work the way i'm used to it.
Hopefully somebody has an ideas - Thanks in Advance!
MikeHi,
use planning function and filter together in a planning sequence.
Include your planning sequence in a button in the web template.
regards
Cornelia -
Query problem - authorization and user entry variable as filter
hi,
I made two variables for the characteristic 0COMP_CODE.
The first variable is a user entry variable for the selection.
The second variable is my authorization variable with multiple single values.
This two variables are defined as filter in the query.
The problem is as follows:
A user is authorized to see the data from three companies. For example companies 1, 2 and 3.
Now he enters on the selection for the 0COMP_CODE the value 2 to see only the data of this company. The query result gets me confused. It shows all data of the companies 2 and others. It basicly shows more companies than he has selected.
Other companies of the authorization variable are shown.
It works if the user has the authorization over all companies.
Did someone has the same problem?
Thanks for your help/advice.
regards,
PascalHi Pascal,
this is an issue. The main problem is that you just can't influence via the exit for a vairable "ready for input".
What could be done is define a dummy element (hidden in the final display) in your query like a restricted KeyFigure to a variable based on COMP_CODE; let's say VAR1 ready for input.
You char COMP_CODE would then be filtered by a variable not ready for input processed by user exit, VAR2.
The exit would ready VAR1. If there any value complying with the authorized one then populate VAR2 with it, otherwise remove it (you could use STEP_3 to raise a message "you aren't authorized to use comp_code XYZ" and return to the initial variable screen). If VAR1 is empty, then populate VAR2 wit all corresponding aithorized values.
The main issue is that
1- this is bypassing the standard functionality of authorization variables
2- any report would have to be designed like that!
What we have done is to add nav_attr / and added more IObjs in the InfoProviders related to 0COMP_CODE reflecting a country, region or any other group of comp_code authorization and then have based our authorizations on those nav....
hope this helps...
Olivier.
Maybe you are looking for
-
Maintain folder state in struts in a JSP
Hi I had a requirement of displaying a group of folders in very large numbers in the corresponding Folder hierarchies in a JSP. I acheived it using Ajax calls. This is the set of steps we have adopted 1. When ever a user clicks a Open/Close/add file/
-
WHat do i do now? It will not update no matter what i do and it is an Ipad 2 purchased only a few weeks ago
-
PhotoShop CC plugins not available
I own Design and web Premium CS6 and Lightroom 5.2 running with NIK and Canon Printer iPF9100 plugins running just fine on a Win7 machine. I purchased and installed PhotoShop CC about a month ago/ When I start PhotoShop CC from the exec file the NIK
-
Time limit on admin account?
I was wondering if there is any way or any third party app which will allow me to set time limits on the admin account. I want this because if I make an other account or guest account it doesnt keep the icon dock customized and it doesnt show XBMC th
-
Select CLAUSE error using CURSORS & XSU.Please SEE.
Hi, I need to create NESTED XML using the DBMS_XMLQuery package. I was instructed to use this for a Test purpose: SQL> set long 40000 SQL> SELECT dbms_xmlquery.getXML('select deptno, dname, '|| 2 'cursor(select empno, ename, sal from emp e where e.de