SSRS Dataset Filter expression query

I have an SSRS report which has a simple dataset and accepts two date parameters, and filters the results based on a Position parameter. The Position parameter filter is:
Expression: Position
Operator: In
Value: [@Position]
I have now been told that each position has a few other aliases in the database against the Position column. i.e. For a Position of "Contractor" I now also need to return "Consultant" records, based on the same field. Note, only one Position
can be selected at a time.
I imagine I have to update the Value expression above to do something like:
- When @Position in "Contractor" also return rows where Position is x, y, z (I am happy to hard code these)
I have about 10 Positions each with one or more aliases - can someone help guide me on how to set up the expression?
Thanks!

Thanks Ione.
Ok - I have set my parameter values in the value box, comma separated
My dataset filter for the param Operator is set to IN and the value [@Position]
However where I have multiple values set against a position I do not get any results (there is data in the DB)
Do I need to do something different when setting the paramter values? i.e. use the expression and then a function to parse the comman separted values
Or - something in the Filter to make the expression parse the incoming paramter?
Thanks again

Similar Messages

  • SSRS dataset filter expression using OR

    I have a dataset that I need to set a filter for. What I need the filter to do is check 3 different fields to see if either one of them are in a parameter. The parameter is multi-value. So, I have a parameter set to 1, 2, 3. I need the dataset to return
    records where either Field A, B, or C are IN 1, 2, 3.
    Anyone know how to do this? I tried to have the filter expression = Fields!A.Value or Fields!B.Value or Fields!C.Value then the dataset filter operator "IN" and the dataset filter value = Parameter, but I just get an error on the dataset filter
    (cannot evaluate filter expression error)

    Hello,
    Mulitple expressions added to SSRS dataset filter are evaluated as AND (Expr1 AND Expr1 AND Expr3). If you are looking for a OR like Expr1 Or Expr2 Or Expr3 then you can use this solution explained below.
    Dataset Query used for this test:
    select *
    from (values ('Row1',1,1,4),('Row2',2,1,3),('Row3',3,1,2),('Row4',3,2,2),('Row5',5,3,2),('Row6',5,6,7),('Row7',2,6,7)) x(DataRow,A,B,C)
    Report Parameter :
    Defined a multi select report parameter named "Parameter1" with string datatype and added values 1, 2, 3.
    Dataset Filter Expression:
    =Filter(Parameters!Parameter1.Value,CStr(Fields!A.Value)).Length + Filter(Parameters!Parameter1.Value,CStr(Fields!B.Value)).Length + Filter(Parameters!Parameter1.Value,CStr(Fields!C.Value)).Length
    The expression above uses the Filter function in SSRS to check if the field A\B\C has any match in the parameter1 mutli select parameter. If yes the length property will return a value > 0. Repeat the expression for all the other fields and add the Values
    for length property.
    Use > operator in the filter dialogue box
    and value as 0 as shown in the snapshot below.
    The output is shown below. Row 6 is missing as Field A, B or C doesnt have 1, 2,3 as values. If this is the output you are looking for this solution should work for you.
    --sIbu

  • SSRS Dataset Filter Operator

    Hi --
    I have a Dataset which returns data based on a multi select parameter. It uses a filter to achieve this and works as expected (based on the IN Operator).
    Now I have to update the report so it also returns records for this parameter value which are NULL - Is it possible to achieve this using an expression/filter within the report, or do I have to get the DBA's to review and update the back-end stored
    procs?
    Thanks

    Thanks Visakh16 -- Sorry, but to add to this..
    I need to allow the user the option to include blank values, or not. Therefore I have added a new parameter "also include blank projects", a yes/no drop down.
    I currently bring back the complete dataset, which is then filtered by the multi select projects param - but how do I get the new parameter ("include blank records") to bring back the selected projects AND records where the Projects field is NULL
    if the new param is equal to Yes?

  • Using report parameter in data set filter expression with an SSAS data source

    I have an SSRS report with an SSAS data source.
    Report parameters:
    Param1 - text, single select
    Param2 - text, multi-select
    Dataset:
    In Query Designer, I want to include Param1 as a filter expression so I can have "Dimension1 Begins with @Param2". I'm not sure the exact syntax to make param2 work in this.
    The point is to filter my data set on param1. If A is selected for param1, I want the data set to have the filter saying "Dimension1 begins with A"
    Anyone know how to use a report parameter in the dataset filter expression for an ssas data source?

    hi,
    try this maybe the dates you are comparing are not in the same format.
    I test data template in EBS but not with dates.
    to_date(date,'dd/mm/YY') between to_date(:p_from_date ,'dd/mm/YY') and to_date(:p_to_date ,'dd/mm/YY')
    if dont works try to put values insted of your parameter like :
    to_date(date,'dd/mm/YY') between to_date(:p_from_date ,'10/01/07') and to_date(:p_to_date ,'01/12/07') ... put dates where u can have some values in report...
    if dont work then try to print the values of the 2 parameters and the date of the select somwhere in ur report to see what you have in it..
    hope it helps..
    Regards Joe.

  • Struggling with MDX Filter Expression for Previous Month in SSRS

    I am trying to query only data from the previous month. 
    I looked at my Month member and the it looks like so... [Date].[Calendar].[Month].&[2015-04-01T00:00:00]
    Here is my filter expression:
    StrToMember ("[Date].[Calendar].[Month].&[" + format(now(),"yyyy-MM") +  "-01T00:00:00]" ).lag(1)
    I am not getting any errors, I am just getting getting "No rows found" - however there is certainly data in last month. I even tried removing the lag() function thinking that might be causing it, but there are still no errors, just no rows returned.
    Here is the complete query:
     SELECT NON EMPTY { [Measures].[Completes] } ON COLUMNS, NON EMPTY { ([Date].[Calendar].[Date].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM ( SELECT ( StrToMember ("[Date].[Calendar].[Month].&[" +
    format(now(),"yyyy-MM") +  "-01T00:00:00]" ) ) ON COLUMNS FROM [Data Warehouse]) 

    Hi S,
    I can't tell exactly what your issue is, but I can give you a couple of tips to help diagnose it.
    Try the following queries. They aren't fixes, just simplifications of your query to help you diagnose where the issue is.
    --This query will let you what your string function is returning with what you want.
    With member measures.x as "[Date].[Calendar].[Month].&["
    + format(now(),"yyyy-MM") +  "-01T00:00:00]" 
    member measures.y as [Date].[Calendar].currentmember.uniquename
    select {measures.x,measures.y} on 0
    [Date].[Calendar].[Month].&[2015-04-01T00:00:00] on 1
     from [data warehouse]
    --This query will give you the date without lag
    SELECT NON EMPTY { [Measures].[Completes] } ON COLUMNS, StrToMember ("[Date].[Calendar].[Month].&["
    + format(now(),"yyyy-MM") +  "-01T00:00:00]" )  on rows FROM [Data Warehouse]) 
    --This query will give you the date with lag
    SELECT NON EMPTY { [Measures].[Completes] } ON COLUMNS, [Date].[Calendar].[Month].&[2015-04-23T00:00:00].lag(1)  on rows FROM [Data Warehouse]) 
    --This query will give you the date with lag
    SELECT NON EMPTY { [Measures].[Completes] } ON COLUMNS, StrToMember ("[Date].[Calendar].[Month].&[" + format(now(),"yyyy-MM") +  "-01T00:00:00]" ).lag(1)  on rows FROM [Data Warehouse]) 
    --This query will show you the member without lag
    SELECT NON EMPTY { [Measures].[Completes] } ON COLUMNS, NON EMPTY
    { ([Date].[Calendar].[Date].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM ( SELECT ( StrToMember ("[Date].[Calendar].[Month].&[2015-04-01T00:00:00]" ) ) ON COLUMNS FROM [Data Warehouse]) 
    --This query will show you the member without lag
    SELECT NON EMPTY { [Measures].[Completes] } ON COLUMNS, NON EMPTY
    { ([Date].[Calendar].[Date].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM ( SELECT ( StrToMember ("[Date].[Calendar].[Month].&[2015-04-01T00:00:00]" ) ) ON COLUMNS FROM [Data Warehouse]) 
    --This query will give you the date without lag
    SELECT NON EMPTY { [Measures].[Completes] } ON COLUMNS, StrToMember
    ("[Date].[Calendar].[Month].&[" + format(now(),"yyyy-MM") +  "-01T00:00:00]" )  on rows FROM [Data Warehouse]) 
    --This query will give you the date without lag
    SELECT NON EMPTY { [Measures].[Completes] } ON COLUMNS, StrToMember
    ("[Date].[Calendar].[Month].&[" + format(now(),"yyyy-MM") +  "-01T00:00:00]" )  on rows FROM [Data Warehouse]) 
    --This query will give you the date without lag
    SELECT NON EMPTY { [Measures].[Completes] } ON COLUMNS, StrToMember
    ("[Date].[Calendar].[Month].&[" + format(now(),"yyyy-MM") +  "-01T00:00:00]" )  on rows FROM [Data Warehouse]) 
    Richard

  • Parameter driven query and SSRS Dataset fields

    I have a Parameter in my SSRS Report, @PatientSelection. I use this Parameter within my SQL Stored Procedure to execute one version of the report and get specific columns, or another version of the report with different columns.
    -- @PatientSelection is set to 1 if the Business Report Requestor chooses "New Patients"
    IF @PatientSelection = 1...
    -- @PatientSelection is set to 2 if the Business Report Requestor chooses "Established Patients"
    IF @PatientSelection = 2
    When I do this, none of my fields are showing up within my SSRS Dataset.
    Am I fundamentally doing this the wrong way concerning SSRS and Report Creation???
    Any feedback is greatly appreciated. Thanks for your review and am hopeful for a response.
    PSULionRP

    You can add manually  the missing fields, drag and drop all needed fields to the tablix and see how was it  going. Doo you use one or two tables(based on the parameters) to display the report?
    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

  • Filter expression producing different results after upgrade to 11.1.1.7

    Hello,
    We recently did an upgrade and noticed that on a number of reports where we're using the FILTER expression that the numbers are very inflated. Where we are not using the FILTER expression the numbers are as expected. In the example below we ran the 'Bookings' report in 10g and came up with one number and ran the same report in 11g (11.1.1.7.0) after the upgrade and got two different results. The data source is the same database for each envrionment. Also, in running the physical SQL generated by the 10g and 11g version of the report we get different the inflated numbers from the 11g SQL. Any ideas on what might be happening or causing the issue?
    10g report: 2016-Q3......Bookings..........72,017
    11g report: 2016-Q3......Bookings..........239,659
    This is the simple FILTER expression that is being used in the column formula on the report itself for this particular scenario which produces different results in 10g and 11g.
    FILTER("Fact - Opportunities"."Won Opportunity Amount" USING ("Opportunity Attributes"."Business Type" = 'New Business'))
    -------------- Physical SQL created by 10g report -------- results as expected --------------------------------------------
    WITH
    SAWITH0 AS (select sum(case when T33142.OPPORTUNITY_STATUS = 'Won-closed' then T33231.USD_LINE_AMOUNT else 0 end ) as c1,
    T28761.QUARTER_YEAR_NAME as c2,
    T28761.QUARTER_RANK as c3
    from
    XXFI.XXFI_GL_FISCAL_MONTHS_V T28761 /* Dim_Periods */ ,
    XXFI.XXFI_OSM_OPPTY_HEADER_ACCUM T33142 /* Fact_Opportunity_Headers(CloseDate) */ ,
    XXFI.XXFI_OSM_OPPTY_LINE_ACCUM T33231 /* Fact_Opportunity_Lines(CloseDate) */
    where ( T28761.PERIOD_NAME = T33142.CLOSE_PERIOD_NAME and T28761.QUARTER_YEAR_NAME = '2012-Q3' and T33142.LEAD_ID = T33231.LEAD_ID and T33231.LINES_BUSINESS_TYPE = 'New Business' and T33142.OPPORTUNITY_STATUS <> 'Duplicate' )
    group by T28761.QUARTER_YEAR_NAME, T28761.QUARTER_RANK)
    select distinct SAWITH0.c2 as c1,
    'Bookings10g' as c2,
    SAWITH0.c1 as c3,
    SAWITH0.c3 as c5,
    SAWITH0.c1 as c7
    from
    SAWITH0
    order by c1, c5
    -------------- Physical SQL created by the same report as above but in 11g (11.1.1.7.0) -------- results much higher --------------------------------------------
    WITH
    SAWITH0 AS (select sum(case when T33142.OPPORTUNITY_STATUS = 'Won-closed' then T33142.TOTAL_OPPORTUNITY_AMOUNT_USD else 0 end ) as c1,
    T28761.QUARTER_YEAR_NAME as c2,
    T28761.QUARTER_RANK as c3
    from
    XXFI.XXFI_GL_FISCAL_MONTHS_V T28761 /* Dim_Periods */ ,
    XXFI.XXFI_OSM_OPPTY_HEADER_ACCUM T33142 /* Fact_Opportunity_Headers(CloseDate) */ ,
    XXFI.XXFI_OSM_OPPTY_LINE_ACCUM T33231 /* Fact_Opportunity_Lines(CloseDate) */
    where ( T28761.PERIOD_NAME = T33142.CLOSE_PERIOD_NAME and T28761.QUARTER_YEAR_NAME = '2012-Q3' and T33142.LEAD_ID = T33231.LEAD_ID and T33231.LINES_BUSINESS_TYPE = 'New Business' and T33142.OPPORTUNITY_STATUS <> 'Duplicate' )
    group by T28761.QUARTER_YEAR_NAME, T28761.QUARTER_RANK),
    SAWITH1 AS (select distinct 0 as c1,
    D1.c2 as c2,
    'Bookings2' as c3,
    D1.c3 as c4,
    D1.c1 as c5
    from
    SAWITH0 D1),
    SAWITH2 AS (select D1.c1 as c1,
    D1.c2 as c2,
    D1.c3 as c3,
    D1.c4 as c4,
    D1.c5 as c5,
    sum(D1.c5) as c6
    from
    SAWITH1 D1
    group by D1.c1, D1.c2, D1.c3, D1.c4, D1.c5)
    select D1.c1 as c1, D1.c2 as c2, D1.c3 as c3, D1.c4 as c4, D1.c5 as c5, D1.c6 as c6 from ( select D1.c1 as c1,
    D1.c2 as c2,
    D1.c3 as c3,
    D1.c4 as c4,
    D1.c5 as c5,
    sum(D1.c6) over () as c6
    from
    SAWITH2 D1
    order by c1, c4, c3 ) D1 where rownum <= 2000001
    Thank you,
    Mike
    Edited by: Mike Jelen on Jun 7, 2013 2:05 PM

    Thank you for the info. They are definitely different values since ones on the header and the other is on the lines. As the "Won Opportunity" logical column is mapped to multiple LTS it appears the OBI 11 uses a different alogorthim to determine the most efficient table to use in the query generation vs 10g. I'll need to spend some time researching the impact to adding a 'sort' to the LTS. I'm hoping that there's a way to get OBI to use similar logic relative to 10g in how it generated the table priority.
    Thx again,
    Mike

  • Parameter not refreshing based on dataset filter

    I have a requirement for a cascading parameter in my SSRS RDL, where the selection of the parameter A refreshes the available values in parameter B.
    I've implemented this as such
    DataSet A populates the values and default values of Parameter A
    DataSet B populates the values and default values for Parameter B
    DataSet B is also filtered by matching the common field in the selected values of Parameter A
    This solution works fine in both Visual Studio Preview of the RDL and when I push the RDL out to my local sandbox SSRS, which is 2008 R2.
    However, our Dev, UAT and Production environments are SSRS 2008 SP3 and the cascading parameter functionality does not seem to be working there. I.e. When I select Parameter A, Parameter B is not refreshed.
    I have read up on cascading parameters (can't link article since my account isn't verified) to see the recommended way to setup these up, but my data sources are XML (calling a WCF service) not SQL so I'm unclear of how to pass the Paramater A value
    to the DataSet B XML query.
    Is this issue simply a limitation of SQL 2008 SSRS vs 2008 R2? Is there any other workaround, etc I can leverage?

    Hi Keenan,
    Sorry for my delay.
    Based on my test, I can reproduce the same issue in SSRS 2008. It is work well in SSRS 2008R2. If possible, I recommend you update your SSRS 2008 to SSRS 2008R2.
    Since this behavior is by design, you can submit a wish to the Microsoft Connect at
    https://connect.microsoft.com/SQLServer/Feedback. Your feedback is valuable for us to improve our products and increase the level of service provided.
    Regards,
    Alisa Tang
    If you have any feedback on our support, please click
    here.
    Alisa Tang
    TechNet Community Support

  • I5Grid MII 14  MDO Filter Expression

    Hi Guys,
    I am building a sample webpage to display MDO query data using I5Grid.
    I am not sure if I am missing any lines. attached is my code and the webpage is empty with no errors on the browser console
    If I remove the below lines, the grid appears, but i need the filter expression and be assigned at runtime.
    dashBoard.getQueryObject().setFilterExpr("[dept] = CSEE");
    dashboard.update(true);
    Kindly help me with this.

    Tried that one to Sriram, same result.
    Few other points to note.
    1.In the browser console there is a 404 error on
          XMII/JavaScript/resources/messages_en_US.properties
    2. In the browser console, filter expression is blank. could this mean anything?
    HH:mm:ss","Debug":"false","DisplayNames":"","Duration":"60","DurationUnits":"M","EndDate":"","FilterExpr":"","Group":"","GroupingExpr":"","InlineTransform":"","IntervalCount":"1","JoinExpr":"","MDO":"RBL_TEST_PRJ/MIIOBJ/TESTMDO","Mask":"","Method":"","Mode":"Select","NumberFormat":"0.00","ObjectParam.1":"","ObjectParam.10":"","ObjectParam.11":"","ObjectParam.12":"","ObjectParam.13":"","ObjectParam.14":"","ObjectParam.15":"","ObjectParam.16":"","ObjectParam.17":"","ObjectParam.18":"","

  • Using sql in the filter expression

    For a project I need to use a filter which is a construction
    with BETWEEN dateFrom AND dateTo.
    But the user does not choose these datevalues,
    he chooses timePeriods which have a unique startDate.
    The dashboard prompts are populated with these timePeriods and the user chooses 2 of these and 2
    presentation variables are set.
    Now I need to retrieve the according startDate for a chosen timePeriod.
    I tried to do this using a sub-query in the filter expression,
    but this seems not to be valid in Answers.
    In standard SQL it is expressed like this:
    select table1.* from table1
    where table1.dateValue  BETWEEN
    +(select table2.startDate from table2 where table2.timePeriod = 'theChosenValue1')+
    AND
    +(select table2.startDate from table2 where table2.timePeriod = 'theChosenValue2')+
    The return of the subqueries are single row, as it should in such constructions.
    I want the where clause to be in the filter expression for the dateValue column in Answers.(trimming of the WHERE keyword)
    Is there any other construction that does this trick in the BI Answers/Dashboard environment to do this?
    Kind regards

    Hi Micek,
    Thanks for your quick reaction.
    Yes you are right the ChosenValues will be replaced by presentation-variables in the final dashboard,
    I just am testing it with constant values in the Answers module.
    The problem seems to be that it is not allowed to use a sub-query in the filter expression.
    The Answers web application says there is a syntax problem near <select>, while I expect the SQL to be valid.
    I guess not all regular SQL is allowed in filter expressions.
    And since the report does not try to fetch data, no log of a generated, real SQL is written to the logfile.
    I need some alternative for the subquery, but one that is allowed in the filter expression.
    The problem is based on the fact that the user chooses a different value then the one that is filtered on.
    The timePeriods represent just one startDate, but I cannot use timePeriod itself to filter on.
    Because I need a between value, wich does not make sense for a timePeriod element
    such as '01-08' or 'JAN-08'.
    Several timePeriod notations are used, so using SubString and || to calculate a numeric value from the timePeriod varchar2 is not a good option.
    The error says:      
    Error getting drill information: SELECT "....
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <SELECT>: Syntax error [nQSError: 26012] . (HY000)
    Any input is welcome
    kind regards

  • SQL in reports filter expression

    Hi All,
    I want to filter the report using the 'in' operator and specify a SQL as the expression. I want apex to be use the result of the query as the list of values for the 'in' operator. Is this supported?
    for example can I specify the filter as 'user_name in (select name from user_name_tab where group_id = 10)'
    Thanks
    Edited by: vmedi on Jan 3, 2012 2:53 PM
    Edited by: vmedi on Jan 3, 2012 2:53 PM

    Hi Micek,
    Thanks for your quick reaction.
    Yes you are right the ChosenValues will be replaced by presentation-variables in the final dashboard,
    I just am testing it with constant values in the Answers module.
    The problem seems to be that it is not allowed to use a sub-query in the filter expression.
    The Answers web application says there is a syntax problem near <select>, while I expect the SQL to be valid.
    I guess not all regular SQL is allowed in filter expressions.
    And since the report does not try to fetch data, no log of a generated, real SQL is written to the logfile.
    I need some alternative for the subquery, but one that is allowed in the filter expression.
    The problem is based on the fact that the user chooses a different value then the one that is filtered on.
    The timePeriods represent just one startDate, but I cannot use timePeriod itself to filter on.
    Because I need a between value, wich does not make sense for a timePeriod element
    such as '01-08' or 'JAN-08'.
    Several timePeriod notations are used, so using SubString and || to calculate a numeric value from the timePeriod varchar2 is not a good option.
    The error says:      
    Error getting drill information: SELECT "....
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <SELECT>: Syntax error [nQSError: 26012] . (HY000)
    Any input is welcome
    kind regards

  • 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

  • MDX Filter Expression

    Hi,
    I am trying to get a filter expression to work.  I am trying to create a filter that will choose the current year.  This will be part of a filter condition that will be a YTD filter.  I am trying to get the year part working first.  Here is what I have so far.  I get this database error:
    A database error occured. The database error text is: Failed to execute MDX query. Reason: Invalid MDX command with ). (WIS 10901)
    Here is the MDS statement:
    <FILTER EXPRESSION="FormatNumber(Year(CurrentDate());'####')">
    <CONDITION OPERATORCONDITION="Equal">
    <CONSTANT CAPTION="1"></CONSTANT>
    </CONDITION></FILTER>
    Thank you for your help,
    Aaron

    I figured out the issue.  I cannot use formatnumber() Year() and getdate() in MDX.  I am using BO over SAP BW.  
    What I was trying to do is create a filter to automatically calculate the current month and year for a YTD filter.  I found out that the MDX YTD() function can be used but the function does not know the current date, so you have to use a prompt to have the user enter the current date.  If there is another way I am up for suggestions.
    Thank you
    Aaron

  • Filter Object with Filter Expression error.

    Hello everyone!
    I'm trying to put together the following expression for a filter to be used in a report:
    Order Date -> object name = M1 - (number, measure)
    Current Date -> object name = M2 - (number, measure)
    Comparison between the two:
    <EXPRESSION> IIF (@ Select (M1) = @ Select (M2), 1.0) </EXPRESSION>
    object name 3
    So far everything works fine.
    When I create a report in Web and I put the filter M3 = 1, it filters properly.
    I thought of putting the filter in a filter object in the universe, like this:
    <FILTER EXPRESSION = "Select @ (M3)"> <CONDITION
    OPERATORCONDITION = "Equal"> <CONSTANT CAPTION="1"/></CONDITION></FILTER>
    Just as it is in Olap universes best practices written by Didier. (Page 12), as following example:
    Filter with a calculated member referenced in the filter expression:
    <FILTER EXPRESSION="@Select(Calendar Year\My Calculated Member)"><CONDITION
    OPERATORCONDITION="Equal"><CONSTANT CAPTION="1"/></CONDITION></FILTER
    But does not work when I put the query, the error is dpscommand. And I have no idea where the error is.
    The strange thing is it works, if I filter the query directly. ( Query filter: M3 equal 1).
    Do you have any tips? or something I could try that I have the M3 as a filter object?
    Tks a lot!
    Livia
    I am working on BO XI R3 - SP2 and the basead query is on SAP BW 7.0.

    macearl wrote:
    SQL View does not display unless data is returned by the query. Is that normal?
    Also, none of these options shows the literal result of the expression we built, i.e.:
    expression: CAST(YEAR(TIMESTAMPADD(SQL_TSI_MONTH, -24, CURRENT_DATE)) as CHAR)
    result: *2008*
    Having the ability to test expressions and see their results would be very helpful in debugging. If anyone knows how to do that please share!
    Thanks!
    MacOk, Probably shoud have figured this out before, but in response to my own question, the way to view the result of an expression is to add the expression as a column and include it in the Table Presentation.
    - Mac (he can be taught)

  • SSRS dataset throws error when another stored procedure is called inside dataset stored procedure

    Hello;
    I am using Report Build 3.0, I have a simple report which gets data using dataset which is created from a Stored Procedure. I have another stored procedure which updates the data in the table which is used for the report. I want to get the live data on report everytime
    the report is run so that I call that stored procedure (sp_updatedata) inside my report dataset stored procedure and here where my report fails as it throws error while creating dataset.
    Here is sample:
    sp_updatedata (this only returns "Command(s) completed successfully"
    Create Proce sp_getReportData
    As
    Begin
    Exec sp_updatedata -- I call it to update the data before it displays on the report
    Select * from customers
    End
    If I remove this line it works.
    Exec sp_updatedata -- I call it to update the data before it displays on the report
    Thanks
    Essa Mughal

    Hi MESSA,
    According to your description, you create a dataset based on a stored procedure. In this procedure, it calls another procedure. Now it throws error when creating dataset. Right?
    In Reporting Services, when creating dataset, all the query or stored procedure will be executed in SSMS. So if the procedure can be executed in SSMS, it supposed to be working in SSRS. However, it has a limitation in SSRS. In a dataset, it can only return
    one result set.
    In this scenario, I don't think it's the issue of calling other procedure inside of procedure. Because we tested in our local environment, it works fine. I guess the sp_updatedata returns a result set, and the "select * from customers" returns
    another result set. This might be the reason cause the error.
    Reference:
    Query Design Tools in Report Designer SQL Server Data Tools (SSRS)
    Reporting Services Query Designers
    If you still have any question, please post the error message and the store procedure (sp_updatedata).
    Best Regards,
    Simon Hou

Maybe you are looking for

  • Payables Open Interface Import rejection

    Hi All Encountered an issue with Payables Open Interface Import. An invoice is getting rejected with reason 'INVALID SUPPLIER'. I have imported invoices for the same supplier as part of data conversion. The only change in data as compared to the tran

  • Convert External HD from PC to Mac

    I have an external hard drive hooked up to a PC. I no longer use the PC and would like to use the external HD with this iMac. I have a feeling that it will not work because it's probably formated for the PC. How can I make it work with the iMac. Can

  • Adobe acrobat 9 pro does not convert word to pdf

    Hiya I get the following error when trying to convert word docs to pdf, have tried repairing the program which works but if I close Acrobat and try to convert the same message appears. Have tried uninstalling and re-installing but same issue, any hel

  • No privileges on system tablespace?

    I am a new dba & have succesfully created tables and added constraints. Today I tried to add a constraint to an existing table, and received the message ORA-01950: no privileges on tablespace 'SYSTEM' I tried to add the constraint as the owner of the

  • File Fransfers/Copies Over VPN Too Slow

    What is the best approach to performing file transfers/copies from site-to-site over a VPN. Bare transfers/copies proceed slowly over the vpn. Should I set up a PC at each site/location as an FTP server ? And if so, any good FTP shareware/free ware/c