Filter Dataset based on a boolean value

Hi,
I have implemented a multivalued filter in SSRS,which works fine . Now I am trying to set up a second filter such that based on a boolean condition i would like to filter the dataset based on  a series of values.
The boolean parameter is accomplished as :
If the user selects "True" the dataset field "Location" has to be filtered based on 3 values "NY,NJ,DC" . If False is selected no filter will be applied on the dataset . The Parameter name is 'Param_Loc' and of datatype 'Integer'
Can you help me with the Filter expression i have to use here : 
Looking forward to hearing from you .
Thanks,
Grigory

Hi Mendel,
Try this once
Go to Filters in dataset properties-> then in the filter expression do the following stuff
Expression =Select the value from the dataset,In ur  case it is
"Location"
Select Type = "Text"
Operator = "in"
Value = IIF(Parameters!Param_Loc.Value=True,"NY,NJ,DC",Fields!Location.Value)
In the above IIF condition what I am doing is passing the filter values if condition is True i.e if Param_Loc is selected .If Param_Loc value is not selected i.e False then u don't want to apply any filter right.So I am passing all the dataset
values in else condition.since 1=1 is universal Truth.
Please let me know if any issues and vote this answer if it helps u.
Kishore Babu K
Thanks Kishore and Visakh . Your inputs were really helpful . Kudos to you guys .
There was a slight issue with the expression  . So i modified it as :
IIF(Parameters!Param_Loc.Value="1",Split("NY,NJ,DC",","),Fields!Location.Value)
Thanks a lot,
Grigory

Similar Messages

  • Unable to filter LookupSet values based on another Lookup value

    Hey all, I've got a report item where I'm pulling a list of values using a lookupset. The lookupset is working as expected, however I need to filter those results based on a different value which belongs to the same dataset as the lookup value. I'm trying
    to filter on the tablix but nothing I try is working to filter. I just end up with no data when I know I should be getting one value. I tried filtering using a lookup and lookupset expression but that doesn't seem to be what is needed. This is my first time
    really diving into lookups so any help would be appreciated.
    Thanks,
    Bryan
    (using report builder 3.0)

    Do you only want the values where type = "Writing Assignment 1". If that is the case then modify your LookupSet as follows:
    =Join(Lookupset(Fields!identifier.Value+"Writing
    Assignment 1",Fields!Student.Value+Fields!value.Value,
    Fields!value.Value, "Comments"), vbCrLf)
    This will require that identifier matches student and type matches "Writing Assignment 1".
    "You will find a fortune, though it will not be the one you seek." -
    Blind Seer, O Brother Where Art Thou
    Please Mark posts as answers or helpful so that others may find the fortune they seek.

  • Changing a boolean value based on two buttons

    I know that this is a ridiculously simple question, but I've been having trouble with it.
    How would you set a boolean value based on the input from two other boolean values? Essentially what I want, in pseudocode, is this:
    boolA = true
    if (boolB)
         boolA = false
    if (boolC)
         boolA = true
    It should be really simple to do, but I can't figure it out. The problem is getting it to stay false, for example, after boolB goes back to false, and not just to have it only momentarily go to false. I want it to stay false until boolC goes to true, regardless of what boolB does after that. Any advice?
    Thanks,
    Logan Williams

    I would say implies is close to what was asked for.  However, the only issue is that for the case where both B and C are false, the logic shows that there is no change to A.  It is initially True, but if it happens to be False because of further changes, there is nothing in the If statements to change the logic.  And that is what is asked for.  That the Result stays False even when B goes back to False.  But the Implies function says that  F and F must be True.
    As described
    B         C         Result A
    T          T          T (because C is evaluated 2nd)
    T          F          F
    F          T          T
    F          F          x (initially T, but the code shown and what is asked for is actually no change from previous state)
       Implies Truth Table
    B         C         Result A
    T          T          T
    T          F          F
    F          T          T
    F          F          T

  • Filter column based on values in second column

    I have a 7 columns (A-G). I want to add a filter to return rows if the value in column D exists anywhere in column C (values in column D and C do not necessarily match).
    Is this possible? I tried creating a filter for column D based on column C using the 'Filter based on results of another request' functionality, but it did not work.
    Create/Edit Filter>Filter based on results of another request
    Column: column D
    Relationship: is equal to any
    Saved Request: same request
    Use values in Column: column C

    Okay, it looks like you are using the same query for both the main and subquery. That won't work.
    1) Create a query with one column, column D. Name it and save it.
    2) Now build your main report with all the columns you desire and on column C, apply the filter "based on results..." and have it point to column D of the subquery in step 1.

  • Report -- filter with selection list -- show all values after select page

    Hello!
    I have the following problem:
    - I have a report
    - this report can be filtered with a selection-list
    - the selection list is based on dynamic LOV and has a null-value
    - I added the code of the report the following, to filter the report after choosing a value of the selection list:
    ... and (instr(type, decode(:P8_FILTER_type, '%null%',type,:P8_FILTER_type)) > 0)
    This works very well.
    But my problem is: When the user logs out and the next time, he logs in, the selection list shows " --- show all values --- " (my null-display-value) and the report is empty "no values found".
    ---> I want to show the first time, the page is selected ALL the values of the report. (this is now only possile if I press the button which belongs to the selection list)
    I hope, somebody understands my problem.
    Thank you so much,
    LISA

    Hello Lisa,
    The first time it's probably NULL.
    So what you can do in your where: (instr(type, decode(NVL(:P8_FILTER_type,'%null%'), '%null%',type,:P8_FILTER_type)) > 0)
    Off topic: I also wonder if that where clause can't be simpler? Do you rely need the instr?
    Regards,
    Dimitri
    http://dgielis.blogspot.com/
    http://www.apex-evangelists.com/
    http://www.apexblogs.info/

  • Data Selection for report based upon a 'Prompt Value'

    I want to report information in my report based upon a 'user input prompt value'
    for example:
    'Enter Shareholder Selection - A-Active, I-Inactive, B-Both Active and Inactive'
    if the user enters 'A', the report selects only active shareholders
    if the user enters 'I', the report selects only inactive shareholders
    if the user enters 'B' the report selects all shareholders, active and inactive
    the field in the database that this based upon is their total share value.
    if this field is greater than zero (>0) they are considerd 'active'
    if this field is equal to zero (=0) they are considered 'inactive'.
    I have tried creating some type of filter,  but am not having any luck. 
    I saw a few examples within the forums that I have tried without any luck....unfortunately most of the examples I've seen are base one only two choices.
    I'm sure I need to create some type of 'independant varible' but am not sure how to do that either.
    Any suggestions would be appreciated.
    Thanks.

    Hi Daryl,
    I Tried this unsuccessfully in DESKI . We can't Eliminate Rows having Empty Measure Values or Measure with 0 as values using Table Level Filter as FIlter can't FIlter rows based on Prompt value selection dynamically. Filters filter rows at a time and not based on 3 condition as Active, Inactive and Both. thus filters are of no use.
    I Tried this in WEBI, and it is working perfectly you donu2019t have to create any Object in Universe, you can do it using function UserResponse() at report level.
    Hence if you are comfortable using WEBI for Generating this report then Follow the steps.
    1. Create Report With Name and Shares Object. It will display all Shareholder Names and No.of shares they hold.
    2. Use Status Object in Query filter, use condition as u201CEqual Tou201D and Select prompt. It  contains Active, Inactive and Both as values.
    3. Report will Display all Shareholder names and No. of  shares  like 45, 789, 0, 4562 where 0 is inactive Shareholder and all other are active shareholder.
    4. Create Variable using Formula.
    =If(UserResponse("Enter Status:")="Active" And [Shares]>0;[Shares];If(UserResponse("Enter Status:")="Inactive" And [Shares]<=0;[Shares];If(UserResponse("Enter Status:")="Both";[Shares])))
    5. Remove Shares Object from the report and Put Variable created with Names of Shareholders.
    6. Select Table-> Properties-> Display-> Uncheck the Option u201CShow Rows with Empty Measure Valuesu201D
    7. Report will display Value correctly as per your Prompt value selection.
    I Hope this Helpsu2026
    Thanksu2026
    Pratik

  • Filter Report based on Apex_item.select_list

    I have question for you here.
    I have a page where I create some page items with apex_item.select_list_from_query based on a hidden item.
    So for example sometimes it creates 3 select lists and another time it creates 2 select lists. That works fine.
    But now I want to filter a report dynamically based on the selected values in these select lists.
    Does anyone have a solution to do this?

    Yes I understand that you have to know more about the table structure. So I translate that part of the datamodel in English for you and you can see it by the url below:
    http://i48.tinypic.com/349dp4g.jpg
    So it is a many to many relationschip between Article and ArticleOptions and the Values table contains the article id and article option id, who are together the primary key.
    And of course the values table contains the corresponding value.
    So if you can see in the datamodel a article group can contains multiple articleOptions, therefor I had to create dynamically the select lists based on the number of articleOptions of that group. That works! And thanks to your help I can filter the article list based on the selected value in a select list. But the problem is that when I have 3 select lists I have to filter the report based on the values in the 3 select lists.
    For example the first select list is articleOption Colour and contains the values blue,white,black. I select black, the report have to show only the articles who have te colour black. And the second list for example contains the articleOption storage with the values 150gb,250gb,500gb.I select 500gb. The report only have to show articles who contains the colour black and a storage of 500gb.

  • JTable row color based on a certain value

    Can anyone please show some code on how
    I can change the background color of an entire
    row based on a string value from the first column ?
    Every time that the first column contains the
    string "TOTAL", I want the entire row to have
    another background color.
    Thanks a lot

    Override getTableCellRendererComponent in Table celll renderer.
    public class MyTableCellRenderer extends DefaultTableCellRenderer
    public MyTableCellRenderer()
    super();
    public Component getTableCellRendererComponent(JTable table, Object value,
    boolean isSelected, boolean hasFocus, int row, int column)
    Component comp = super.getTableCellRendererComponent(table, value, isSelected,
    hasFocus, row, column);
              ((JLabel)comp).setOpaque(true);
    if(value.equals("TOTAL")
    comp.setBackGround(color);
    else
    set whatever the default background color

  • Filtering an EVDRE report based on a Data Value

    Everyone,
    I have a report that has accounts in the columns without expansion. I am capturing various status codes in one account and I need to know how to filter the report based on a data value that is retrieved from the database for this account.I am also using the EVdre sort functionality along with an EVSUB in the after range which  sub totals the Organization and Materials Dimensions in the rows.  When I try to use native Excel to filter  based on the value of the Status Code Account  the report will only sort the top section of the report. As soon as it hits the Subtotals it stops filtering. Is there a way to filter the report in EVDRE based on the data value that is returned from the database.
    The account that I want to filter on is Status Code. We can have two values in it either 10 = Submitted or 30 = Business Case. The users want to be able to filter the report to only show the status code of 10 (Submitted) for their Executives to review.
    Edited by: eleasha counts on Aug 3, 2011 12:22 PM

    Hi eleasha,
    I don't know if you will entertain FORMATRANGE.
    But you can use formatrange to hide those rows you donot want to see.
    You can use the CRITERIA as VALUE=<<anyvalue>> you want to verify and apply it on rows.
    You can set the PARAMETER value as ROWHEIGHT=0, and apply to ALL.
    Try this with the combinations you need to see.
    Hope this helps.
    Karthik AJ

  • How to make a tabular form readonly based on an item value

    Hi everyone,
    I am getting there, but I need to make a tabular form read-only based on an item value.
    I've copied this from somewhere (thanks) and changed it for my needs and it works great to set the second column of my form
    to read only.
        var els = jQuery('#Entry_Form input[name="f02"]');
        /*var r = confirm("els is " + els);*/
        els = els.filter(function(index){
          return jQuery(this).val() != "";
        });Just need to set the jQuery selector to jQuery("td[headers='PRODUCT_NAME']"), cos that's my column name.
    also need to give a static id of Entry Form to the form.
    I'll try to understand what this code means exactly one of these days, but now I need to make
    the whole tabular form read only based on a text item, :P5_CONTROL.
    Grateful for any help on this, in the above format if possible. Greek to me but compact and it works.
    Regards.
    Leckraj

    Hi,
    actually, there is no code, just one dynamic action. You may have to change the event which triggers it.
    Event: Change
    Selection Type:     Items(s)
    Item(s): P1_ED     
    Condition: equal to     
    Value: D
    True Action 1
    Action: Disable
    Fire On Page Load: yes
    Selection Type: jQuery Selector
    jQuery Selector: input[id^="f"]
    True Action 2
    Action: Disable
    Fire On Page Load: yes
    Selection Type: jQuery Selector
    jQuery Selector: input[id="check-all-rows"]
    False Action 1
    Action: Enable
    Fire On Page Load: yes
    Selection Type: jQuery Selector
    jQuery Selector: input[id^="f"]
    False Action 2
    Action: Enable
    Fire On Page Load: yes
    Selection Type: jQuery Selector
    jQuery Selector: input[id="check-all-rows"]
    Regards, Garry

  • Comp BT116H_SRVO filter attachment Document Template on field value

    I have a requirement to filter the attachment template documents based on a zfield  value in component BT116H_SRVO . I created a table that will map the template id to a specific zfield value (drop down) & I'm using BADI: Authorization Check on Document Level to within contentmanagement filter which templates will be available. The first time the correct Templates are display but during field value change in  BT116H_SRVO/Details the template values are not updated. The compoment BT116H_SRVO is using component GS_CM to display the template. Please advice.

    This will happen if you mistakenly save a Child page as a Template.dwt and overwrite your original Template file. Do you have a backup of your original Template stored some place safe?
    In the future, when you have questions related to Dreamweaver, use the Dreamweaver Forum. You'll get better, quicker answers there.
    http://forums.adobe.com/community/dreamweaver?view=discussions
    Nancy O.

  • Boolean values

    Does anyone know how Q&A handle boolean values?  If a dataset includes a column with true/false values, what is the correct syntax for a Q&A query that filters on this value.
    Carla Sabotta

    I think it will work normally as other columns 
    for e.g. consider table students with column IsEligible having boolean values
    Then Q/A query like "Count  of students where IsEligible is true" should work fine and return count of students where IsEligible is true
    Moreover If we set a proper data type of column then it should work more intuitive
    E.g If we set IsEligible column to have data type as TRUE/FALSE and set word Eligible to be its synonym   then Query like "Count of Eligible Students" should also work
    Let me know if this answers your question.
    Thanks,
    Sagar K

  • Can a Content Query Web Part (CQWP) be used to filter content based upon a substring of a variable

    Folks, I'm a newbie to this forum and to SHarepoint in general - so please be gentle :-)
    I'm using Sharepoint 2010 and have content in lists which I want to display based upon certain user attribtes. For example I have a sharepoint LINKS list which contains entries for vaious applications (I'm using the LINKS list as an example, however I'd
    like to apply it to many libraries/lists).
    Name:UK Intranet - URL:http:UKintranet.com - Description: UK
    Name:USA Intranet - http:USintranet.com - Description: USA
    Name:UK Contacts list - http:UKPhones.com - Description: UK
    Name:USA Contacts list - http:USAPhones.com - Description: USA
    My users are split accross AD domains, one for each called UK and others in a domain called USA 
    What I would like to do in a content query is display items where the users domain (ie UK or USA) is contained in the Description field.
    So a CQWP which includes something like "filter when Decription = &userdomian"
    I should also add that I am only using basic page editing in a browser and have no access to Sharepoint Designer
    Can this be done?
    BTW - I know this is a little like Audience Targetting, however I don't have rights to setup audiences and as the information about the audience is already available in the users domain I simply wanted to reuse that.

    Hi Peter,
    According to your description, my understanding is that you want to filter items based on the current user’s domain.
    Whether you could access Central Administrator, and create a new user property in User Profile Service Application->Manage User Properties. If yes, create a new user property (assuming it is called ‘Domain’)to store the users’ domain information. If not,
    please choice a existing user property that you don’t use to store the domain information, like Department.
    Then do as the followings:
    Open the page that you want to display the list.
    Eidt the page and insert the list into the page.
    Insert a Current User Filter web part(Insert->Web Part->Filters->Current User Filter) into the page.
    Then edit the Current User Filter web part, and select value to provide: SharePoint profile value for current user: Department(or Doamin).
    Connect the Current User Filter web part to the list: Connections->Set filter values to->the list.
    Connection Type: Get Filter Values from, click Configure.
    Consumer Field Name:Description, click Finish.
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • OBIEE filter result based on current day of Month

    Dears,
    I am running an exercise to restrict all available data in my table based on current day of month (less than or equal to), what I am having a trouble in is that when I create a variable in prompt (just to test the query) the below sentence works where when adding it the Criteria body an error happens:
    SELECT DayOfMonth(CURRENT_DATE)-3 FROM  "Anysubjectarea" (it works)
    but the below won't:
    Error getting drill information: SELECT  Month("DIM_TIME"."MONTH") saw_1, Day("DIM_TIME"."DAY") saw_2 FROM "AGGR_REVENUE" WHERE ("DIM_TIME"."YEAR_ID" IN (2014, 2015)) AND (Day("DIM_TIME"."DAY") <= (SELECT DayOfMonth(CURRENT_DATE)-3 FROM "AGGR_REVENUE"))
    any help?
    Moreover, I have no rich experience in OBIEE, is not there any place to test the query before applying it? If it's a product of ORACLE, why Select sysdate from dual is not working work???
    P.s: I have no access to create a repository variable

    Hi,
    Why do you want to use a "SELECT ...." in your filter? There is no added value in having a subquery in the filter except a slower analysis in your case.
    Just add a filter to your "DIM_TIME"."DAY" column and check the "convert this filter to SQL".
    And just write your condition there :
    Done !
    In the Administration you have a link named "Issue SQL" where you can enter LSQL and execute it if you want.
    For your last point I guess you are forgetting what OBIEE is ... "Select sysdate from dual" is a query for Oracle Database, OBIEE doesn't "speak" SQL but uses LSQL, so you need to use the correct syntax for LSQL. Also the point of OBIEE is to hide your sources and not be limited by the physical source available in your RPD. Did you try to run a "Select sysdate from dual" against an Excel file? Does it work? Not really (or you have a really smart Excel).
    But if you run the same LSQL against an Oracle DB, an Excel file, an Essbase cube they all give you the same result: that's the power of LSQL, adding an abstraction layer on top of your multiple physical sources and have a single language to interact with all of them ...

  • Looking for help with javascript to autofill checkboxes based on a numeric value.

    I have a numeric field that I would like to have 1 - checkbox
    out of five autofilled based on a numeric value.
    For instance the numeric value is TotalPoints
    If the TotalPoints Value is >10 autofill this checkbox
    If the TotalPoints Value is 10 - 19 autofill this checkbox
    If the TotalPoints Value is 20 - 49 autofill this checkbox
    If the TotalPoints Value is 50 - 69 autofill this checkbox
    If the TotalPoints Value is 70+ autofill this checkbox
    Assistance in writing the correct script for this would be greatly appreciated.

    All the checkboxes have separate names. 
    Check box #1 is AssetClass.0 with the export value of 1
    Check box #2 is AssetClass.1 with the export value of 2
    Check box #3 is AssetClass.2 with the export value of 3
    Check box #4 is AssetClass.3 with the export value of 4
    Check box #5 is AssetClass.4 with the export value of 5
    Score and StrategyUse the following calculation to determine your point score and indentify the appropriate strategy listed below.A. Add your points for questions 1 – 2.
    B. Add your points for questions 3 – 12.
    C. Subtract B from A. (Numeric Text Box)  name is TotalPoints
     Points Strategy Asset Class Mix (check boxes as named above)
     0 – 10 Primarily Fixed Income: 80% Fixed Income; 20% Equity
    10 – 19 Balanced Fixed Income-Oriented: 60% Fixed Income; 40% Equity
    20 – 49 Balanced Equity-Oriented: 40% Fixed Income; 60% Equity
    50 – 69 Primarily Equity: 20% Fixed Income; 80% Equity
    70+ Equity: 95%; 5% Cash 

Maybe you are looking for

  • My Time Capsule hard drive shows up in Finder, but I can't access the disk.  I get a connection failed message.

    I can not access my Time Capsule from the Finder.  This was working, but on 12/25/2011, the disk can no longer be accessed.  It shows up in the Finder, but when I try to connect, I get a "Connection Failed" message.  If I cycle the power, it works fo

  • Need help with Zen Micro Photo: It stays in recovery m

    Just recently, my zen micro photo has been staying in recovery mode. I have tried all of the four options available? to me in recovery mode. .) Clean up 2.) Formatt All 3.) Reload Firmware? 4.) Reboot. When I try "Reload Firmware". It doesn't really

  • Itunes 7.7.1 has still bugs.

    when it is time to update apps, you go to applications, click update available down. you can only see updating apps, not all. it was fine in itunes 7.7. but on 7.7.1, it shows all apps which are already updated somehow. then if you click to update, i

  • Configure Network Level Authentication for Remote Desktop client

    We publish Remote Desktop in our Windows 2008 R2 terminal server. However, in Windows 2008R2 , the remote desktop client will a lillte bit slow I found out that if I modify the setting in default.rdp authentication level:i:0 enablecredsspsupport:i:0

  • Exceeding data allowance 2 days into the billing cycle

    I'm 2 days into my new billing cycle and one of my iphones on AT&T and another on Verizon have both triggered a warning from the carrier that I am close to exceeding my data allowance on my 2GB data plans. I've never exceed with these phones before a