More than one filter on same dataset

  • Hi all

    I have a situation where I want to filter a tablix more than once:

    first filter will be to show the quarter numbers and the second filter will be to show the year to date numbers.

    I am creating a report that will show quarterly numbers and ytd numbers which come from the same dataset.

    Is it possible to filter the dataset so that one section shows quarterly and the other yearly?

    I have attached a screenshot of my current view.

    Thank you for your assistance.

  • Have you considered using a CASE statement in your query that creates output relative only to Q1 and then another that will give you YTD?

  • I will try using the case statement.

    I have a report parameter for the querter which is chosen before the report is displayed.

    Would I need to cater for each quarter (Q1 - Q4) with case statements or can I use a reference to the report parameter in one case statement?

    Thanks

  • I found a work-around solution by using the case statement in SQL and generated figures for Q1 - Q4 and YTD as individual columns. Then in SSRS I used the below expressions:

    For Quarters:

    =SUM(Switch(Left(Parameters!ReportPeriod.Value,2) = "Q1",Fields!Q1.Value,Left(Parameters!ReportPeriod.Value,2) = "Q2",Fields!Q2.Value,Left(Parameters!ReportPeriod.Value,2) = "Q3",Fields!Q3.Value,Left(Parameters!ReportPeriod.Value,2) = "Q4",Fields!Q4.Value))

    For YTD:

    =SUM(Fields!YTD.Value)

    This works perfectly, the quarterly figures change as I select the relevant parameter (Q1-Q4) and the YTD figures show as of now.

    Maybe not the perfect solution but it works, thanks Tee Time for the suggestion.

  • You're welcome!

Viewing 5 posts - 1 through 4 (of 4 total)

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