Thursday, March 29, 2012

Can I hide data fields in a Chart?

I have a Bar/Line Chart with two data fields. Field #1 is displayed as a bar,
Field #2 a line. I would like to allow the user to choose via a parameter if
the line is displayed.
I tried the following expression for the Field:
=iif(Parameters!ShowTrend.Value=True,Fields!Trend.Value,False)
But rather than hiding the line, it makes all values zero with the line
still showing.
Is there some way to hide the line?
Thanks.You may want to try:
=iif(Parameters!ShowTrend.Value=True, Fields!Trend.Value, Nothing)
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"bill" <bill@.discussions.microsoft.com> wrote in message
news:745AF66D-CC9D-4D91-845C-FD4227C08E59@.microsoft.com...
> I have a Bar/Line Chart with two data fields. Field #1 is displayed as a
bar,
> Field #2 a line. I would like to allow the user to choose via a parameter
if
> the line is displayed.
> I tried the following expression for the Field:
> =iif(Parameters!ShowTrend.Value=True,Fields!Trend.Value,False)
> But rather than hiding the line, it makes all values zero with the line
> still showing.
> Is there some way to hide the line?
> Thanks.
>|||Show/hide is not supported in charts.
But why don't you try a dynamic series grouping and filter those series
groupings that you don't want show (the Grouping&Sorting dialog for every
chart grouping has a filter tab where you can define expressions to filter
data). This should also take care of the chart legend issue.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"bill" <bill@.discussions.microsoft.com> wrote in message
news:6B4516F9-D415-4522-838F-BCBAF0789F30@.microsoft.com...
> Thanks for the reply, but "Nothing" gives me the same results as "False"
...
> the line shows-up on bottom with zero values.
> I can get the effect of hiding (sort of) by setting color to transparent.
> But the data series still displays in the legend box.
> Is there no way to dynamically let the user specify what data elements
they
> want to show/hide on a chart?
> Bill
> "Robert Bruckner [MSFT]" wrote:
> > You may want to try:
> > =iif(Parameters!ShowTrend.Value=True, Fields!Trend.Value, Nothing)
> >
> > --
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> >
> > "bill" <bill@.discussions.microsoft.com> wrote in message
> > news:745AF66D-CC9D-4D91-845C-FD4227C08E59@.microsoft.com...
> > > I have a Bar/Line Chart with two data fields. Field #1 is displayed as
a
> > bar,
> > > Field #2 a line. I would like to allow the user to choose via a
parameter
> > if
> > > the line is displayed.
> > >
> > > I tried the following expression for the Field:
> > >
> > > =iif(Parameters!ShowTrend.Value=True,Fields!Trend.Value,False)
> > >
> > > But rather than hiding the line, it makes all values zero with the
line
> > > still showing.
> > >
> > > Is there some way to hide the line?
> > >
> > > Thanks.
> > >
> > >
> >
> >
> >

No comments:

Post a Comment