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

Similar Messages

  • 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

  • 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.

  • How to use the prompted value in the filter expression

    Hi
    Is it possible to use the prompted value in the filter expression?
    My requirement is that user will be prompted for a date field and I need to filter the records such that the records are displayed for the last 5 weeks from the date entered by the user.
    If somehow I know how to use the prompted value in the filter expression then this requirement is easy to be done. If this is possible, please guide me?
    If there are other ways to acheive the desired results then please suggest.
    Thanks
    -Jaz

    Edit: example added
    SQL> create table tb_test
      2  ( id number(5)
      3  , tot number(5)
      4  , mon_tot number generated always as (tot*15) virtual
      5  );
    Table created.
    SQL> insert into tb_test (id, tot) values (1, 5);
    1 row created.
    SQL> select * from tb_test;
            ID        TOT    MON_TOT
             1          5         75
    1 row selected.
    SQL> update tb_test
      2  set    tot = 15
      3  where  id = 1;
    1 row updated.
    SQL> select * from tb_test;
            ID        TOT    MON_TOT
             1         15        225
    1 row selected.

  • 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

  • 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 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
    @li

    Hi @li,
    Syntax-1 is fine it will work,What kind of Variable is it?
    Static or Dynamic
    Thanks,

  • 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

  • Filter Strings using regular expressions

    Requirements.
    1.I have a table with different names.
    2.I input a word(string) through a text box.
    3.I filter table using the input string through text box using the code
    ((DefaultRowSorter)table_customer.getRowSorter()).setRowFilter(RowFilter.regexFilter(regex, indices));
    4.regex is obtained as follows.
    String regex = "";
    String text = txtFilterText.getText();
    regex = "^(?i)"text".*"; //for starts with filter
    regex = "." + text + ".";//for contains filter
    regex = "(?i)["text".*]";//for doesnt start with filter
    regex =".*(?i)"text"$";//for end with filter
    I need help for doesnt contain and doesnt end with filters.Plz help me out..
    Anees

    h2. {color:ff0000}Double post{color}
    Reply here: http://forum.java.sun.com/thread.jspa?threadID=5231406

  • 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

  • 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":"","

  • 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

  • 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

  • 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

Maybe you are looking for