Expression to hide tablix in ssrs

872 Views Asked by At

I wish to set the visibility for the tablix based upon the value selected in parameter.

The scenario is I have four tablix week, month, quarter, year. I have created a parameter "timeline" and in the parameter i have added week month quarter year as specified values in available values option

I have used the following queries but i cant hide those tablix if I select corresponding value from the timeline parameter (Even if I select or deselect any value in the parameter all the four tablix are displaying)

=IIF(Parameters!Timeline.Value = "Month",TRUE,FALSE) =IIF(Parameters!TimeLine.Label.Equals("Year"),True,False)

What expression would fix this issue?

Here is the screenshot of the Report screen

2

There are 2 best solutions below

0
On BEST ANSWER

You can use below code by following below note:

Set visibility false of all your tablix so that when you will select all

=SWITCH
(Parameters!Timeline.Value = "week",TRUE,FALSE,
Parameters!Timeline.Value = "month",TRUE,FALSE,
Parameters!Timeline.Value = "quarter",TRUE,FALSE,
Parameters!Timeline.Value = "year",TRUE,FALSE
)
0
On

You need to apply the Visbility on the Column Group. (MTD, QTD, YTD, etc) and not on the Taxlib itself.

Additionally, for the MTD for example, the hidden expression Parameters!Timeline.Value <> "Month"

Hope this helps.