Can I filter a table based on parameter IIF statement, otherwise no filter?

  • Hello!

    I have a dataset that has daily stats with days specified as Weekend/Weekday, and I have a parameter ("@Daygroup") to represent this. I'd like the report users to be able to filter the data by this field, but also have the option of viewing everything/both.  Currently, it's inside a table in which I've only been able to apply a filter to the effect of DayGroup = @Daygroup.

    How would I be able to set it so that if I add another parameter option of "ALL" that it will essentially not apply the table filter and just show everything?

    Thanks in advance for any ideas.

  • Add the 'ALL' option to your WHERE clause:

    WHERE @Daygroup = 'ALL' OR DayGroup = @Daygroup

     

    Eddie Wuerch
    MCM: SQL

  • I cannot change the underlying dataset query/stored procedure.  The full dataset is returned.  I can only filter the dataset based on parameters selected in the SSRS report so I need to know how to do this in the table (or even dataset) filter option.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply