Data label Expression

ron barlow 411 Reputation points
2020-12-09T20:24:17.293+00:00

G’day

We got the attached stacked bar chart,

The problem is the display of the data series. If the section is too small the value goes over the lines or the chart adds an arrow.

Is the a way to tidy this up for example only show a value if it’s above a certain threshold.

I tried this expression in the Visible property of one of the bars, but it didn’t seem to work?

=iif(Sum(Fields!EnglishValue.Value, "ChartData")>=5, True, False).

I guess it’s applying it across the entire series, but I want to evaluate each individual bar?

Any ideas.
46693-stack.jpg
Many thanks
Ron

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,061 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Joyzhao-MSFT 15,631 Reputation points
    2020-12-10T03:17:53.34+00:00

    Hi @ron barlow ,
    Try the following expression:

    =IIF(Sum(Fields!EnglishValue.Value)>=5,True,False)  
    

    I did some tests locally to reproduce your issue, as shown below:

    1. Create a stacked bar chart.
      46700-01.jpg
    2. Select data labels. In the "Visible" option in the property bar, drop down and select the expression, enter: =IIF(Sum(Fields!Price.Value)>=15,true,false).
      46813-properties.jpg
      46814-expression.jpg
    3. Preview
      46644-preview.jpg
      After my test, the expression can successfully hide data labels less than 15.
      Best Regards,
      Joy

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    What can I do if my transaction log is full?--- Hot issues November
    How to convert Profiler trace into a SQL Server table -- Hot issues November

    0 comments No comments

  2. Joyzhao-MSFT 15,631 Reputation points
    2020-12-22T05:42:40.707+00:00

    Hi @ron barlow ,
    Has your issue been resolved?
    If you have any question, please feel free to let me know.
    If the answer is helpful, please click "Accept Answer" and upvote it.
    Best Regards,
    Joy

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.