SSRS no data label for 100% chart - sql-server

I have created a SSRS 2017 report with a pie chart. The dataset returns the number of 3 different values/sections (total "green", total "yellow", total "red").
Now I want to show the data labels (-> pictures). I switched to line-chart, added the formula e.g.
= IIf(Fields!red.Value=0, "", "#PERCENT"+ chr(10)+ "(#VALY)")
to each line/section.
It works fine (-> picture 1) but e.g. for the case when I have 2 zero sections and only 1 section with 100%, the data labels are not shown. For each value > 0 < 100 the data labels are visible.
I also tried it without the formula/default values but the problem also occurs.
Does anyone know the issue?
Thx in advance for your replies!!
Pie chart with different values
100 percent pie chart

It looks like all you need to do is update the expression. It would also depend on how you have the series label data setup.
= "#PERCENT"+ chr(10)+ "(#VALY)"

Query for data
I use this simple Query as data set.
So aggregations are done via SQL Query, not by SSRS.
All I want is that the 96 green data/100% are visible as label on the diagram, but it doesn't work...
The problem also occurs for line diagram, so it has nothing to do with the pie chart..

Related

anychart stock - range selection with mm:ss resolution

i'm using anychart stock 8.1.0. I have a dataset with 24 hours of date with per-second resolution. I would like for only a small 30 seconds subset of that data to be shown/zoomed on load.
I could not find out how to do this so i tried adding a range selector option like below but i couldn't get that working either.
rangeSelector.ranges([{
'text': 'Testing',
'startDate': '2006 May 16 13:00:00',
'endDate': '2006 May 16 13:00:30'
}
If i use the range selector slider i can zoom as i require but how do i define this in code ?
So to recap i'd like
have the chart zoomed on load for a specific time range of type
start-stop in format of dd/MM/yyy mm:ss
have range selector button options for various time ranges of same format as above.
thank you.
Yes, you can define your own custom periods for rangeSelector, but if you want to zoom to specific period on load you have to call selectRange() method after chart drawing.
If you want to show only 30 seconds in the beginning of your series you should put the following line into your code:
chart.selectRange("second", 30, "first-date", true);
You can learn more about this method here
And find a similar example of using it here

SSRS Hide one legend from each series

I've been looking around at SO and Google but not really found anything that matches my current problem.
I'm making a stacked barchart based on two series. One series shows late, outstanding issues and one shows only outstanding (still within the due date).
The problem is that my legend shows four individual items, whereas I only want two (one for each series).
I've attempted by adding this in the Series Properties>Legend>Do not show this series in a legend formula (fx):
=IIF(Fields!ReadyForWork.Value = 1, False, True)
This basically checks to only display the legend if the value is 0. However this hides both the items in the legend, not just the one.
The relevant data I'm working with right now is:
TRK_Feature_LKID (basically each row's PK)
DateToBeActioned (important for maroon) - Used to determine if Date.Now() is higher to a set date when the issue should have been resolved.
ReadyForWork - A numeric value (0 / 1) to see if the item is ready for work.
AcountablePerson - The name of the responsible person (x-axis).
In below image I want to remove the red 'Late Issue' and the maroon 'True - ReadyForWork'.
So I managed to fix this by adding a separate field in the report's dataset that basically checked whether the DateToBeActioned was outside of GETDATE:
CASE
WHEN DATEDIFF(day, [DateToBeActioned], GETDATE()) >= 0 THEN 1
ELSE 0
END as 'Outstanding'
And by using that field in the legend as well as specifying that the dataset should only retrieve issues that had not been completed:
WHERE ReadyForWork = 0
I was able to set the legend to only show the two preferred items.
So for anyone who might face a similar issue; one way of fixing it might be to have a seperate field in your dataset that checks the case that checks for the parameters you don't want / you want to show in the legend.

Angular NVD3 y-axis scale

I have an app that creates discrete bar charts. For some odd reason (which seems to be an internal error in the library), the y-axis scales to a data value which has the LOWEST number of integers in the value. For example, one data set has (1750, 1056, 1200, 850). The y-axis scales the maximum range to "850", even though the other numbers are all larger. I've tried using the forceY function, setting the maximum range value to the callback of the data value in my json, but it doesn't work. The problem only corrects itself if all of the numbers in the data set have the same number of integers in the value (i.e. all hundreds, thousands, etc). What is going on and is there a way to fix it??
For reference, here is my plnkr. Go to the "Top 5 SIC by Comments" report chart to see what I mean. The same problem occurs with the "Top 5 Topics by Comments" report chart as well. If anyone has any insight as to how to fix this problem, please let me know. Thank you ahead of time.

ShieldUI Stacked Bar Graph with Totals

I've got a stacked bar graph that shows two categories of information. Now I have a requirement to show the total of the bars at the end of the bar. I've attached a mock-up showing what I'm trying to do -- the numbers in red are what I'm trying to add.
(source: michaelandlisa.us)
I couldn't find anything in the documentation on how to add totals, or on how to add annotations (which would also work).
Basically, ShieldUI jQuery chart plugin renders the series without text, as shown here.
To alter this behavior, you need to first enable the text.
Then, you can use a format function to either show some cumulative text, or return an empty string. More information on this approach is available here.
This can be coupled with a global counter to determine each Xth iteration.
I managed to get this to work by adding a Scatter chart of total values on top of the existing bar chart.
http://michaelandlisa.us/Images/Forums/stacked_with_totals_scatter.png
I also set the color on the series to "transparent" so the point wouldn't show up, and then I bumped the X and Y by 15 and 12 respectively. I also set the style to Bold, and set the format to "{point.y:n0}". Here's the relevant MVC code (where totals is a List of object):
.DataSeries(series => series.Scatter()
.Data(totals)
.CollectionAlias("Total")
.Color("transparent")
.AddToLegend(false).DataPointText(dtp =>
{
dtp.Enabled(true);
dtp.Format("{point.y:n0}");
dtp.Style(s => s.FontWeight(FontWeight.Bold));
dtp.Color("red");
dtp.X(15);
dtp.Y(12);
}))

Color cell value in SSRS

I have a Table that looks something like this:
I have an SSRS report that looks something like this:
I want to color Latency value based on next value.
Based on BuildNumber i will get different LatencyValues in report i grouped BuildNumber and displayed LatencyValues on that build Number. Now the LatencyValues differ for different builds by comparing one latency value to another i want to give color.
Thanks in advance
Try the following: open the Properties pane and use something like the following expression in the Color property:
=IIF(Fields!Build1.Value <> Fields!Build2.Value, "Red", "Black")
If its only the two builds you are comparing you could modify the underlying sql code so you won't need grouping. If you want to keep the grouping have a look at the following post http://social.msdn.microsoft.com/forums/sqlserver/en-US/7af36b3b-080a-4626-abf0-1060fac6f5cb/conditional-formatting-depending-on-previous-cell-in-matrix

Resources