SSRS - can I link the axis of two charts together? - sql

am using SQL Server 2012 and Visual Studio 2010.
I would like to link the y axis of these two charts together, is this possible?
M

In the vertical axis properties you can configure the maximum value for the axis with an expression. Then check whichever dataset contains the largest value and set it to that (optionally adding a bit of padding if you need to).
You can check the maximum value of each dataset by scoping the MAX() function to the particular dataset.
Your expression for the maximum axis value would look something like this:
=IIF(MAX(Fields!c.Value, "DataSet1") > MAX(Fields!c.Value, "DataSet2"), MAX(Fields!c.Value, "DataSet1"), MAX(Fields!c.Value, "DataSet2"))
In this case there are two datasets named "DataSet1" and "DataSet2" and they both have a field named c which is the value displayed on the chart.
Note: This won't work if you're applying filtering to the data on the chart or you're doing aggregations based on the grouping. There may be a different scoping you can use in that case but I'd have to play around with it to figure it out.

Related

How can I generate a dynamic series in Power BI, for which the first value depends on a measure, and then plot on a visual?

Looking to generate a series of dates and values on Power BI for which the first value and the increments depend on measures. (Dynamic series generation and then applying to visuals).
Tried do to this through a calculated column, however this was unsuccessful as the column is calculated before the filtering on the measure can occur - so it was providing me with undesired results.
I have also tried to use GENERATESERIES within a measure with UNION to combine the date and values series. However, I am then unable to plot this on a visual as I have multiple values for my measure.
Any help would be greatly appreciated.
Cheers
GDB007
As long as you have a fixed X-axis, you can certainly define the Y-values dynamically using measures that are dynamic.
For example:
In this example, I just defined the [StartValue] measure as a constant 1 but it could be whatever you like. The [Increment] measure here just reads in the value of a small parameter table I created to show multiple values simultaneously by dropping that column in the Legend field of the visual, but this could also be whatever you like.

Make Spotfire ignore empty values in the categories of charts and show a visualization without "spaces" between the bars

I have a group of trellis graphs on some data, in there you can see a numeric variable on the Y axis and a series of cell dishes on the X axis. Not all the numeric values are present on all the series of cells. Because of this the visualization results in a graph with empty spaces:
This is OK most of the time but the thing is I would like to avoid the "empty spaces, only in these graph series, that you can see between the bars. I would like to see showing only the pattern of the cell dishes where I have data.
Trying to do so I tried creating a calculated column to use it as a ordering index (https://docs.tibco.com/pub/sfire-bauthor/7.9.0/doc/html/en-US/GUID-8CAA18D0-CF28-4707-9945-041BDFD99E99.html) (Sorting Filter values asc/desc on Tibco Spotfire), after that "Limit data by expression" using a "[MyColumn] is not null" on it (https://community.tibco.com/questions/can-i-automatically-make-spotfire-ignore-empty-values-categories-charts) (How to show the top 10 column values in Spotfire) with no luck and I tried also (https://docs.tibco.com/pub/spotfire/6.5.1/doc/html/ncfe/ncfe_details_on_custom_expression.htm) create a custom expression, which I think it would be a good solution because I understand it will only affect these graphs and not the complete set of visualizations but no, I don't reach the point to change it. Last that it should work but it doesn't is to "Show/Hide Items" under a Boolean expression that it would include that "[Axis.Value] is not NULL" and "Apply individually for each trellis panel" of the numeric column which sound terrific but... nope, it didn't work either...
Any help would be appreciated, now I will select one by one on individual graphs extracting them and plotting them in other place but this is not very useful as a "large scale" solution. I am sure there is a way to insert a proper expression to avoid the null values of the cross of both variables, the numeric and the cell dishes.
this is because you are trellising data, not the axis. you won't be able to filter out values on the x axis; it's simply not how trellis works.
using multiple visualizations is the solution, but I assume you've got n sets of categories that you want to separate out without creating a ton of charts on the page and perhaps you can't guarantee the number of categories or their names, so you want to build a flexible solution.
please check out an answer I just wrote over here which illustrates how to use a document property and a property control to limit a visualization. your property control can be linked to automatically and dynamically display unique values in your "category" column (the one you are trellising by). maybe this can be a solution for you?

PowerBI Dynamic Time Series BarChart

Adding on my previous question here: TimeSeries question
I would like to plot a unit capacity chart over a Time series (which contains a range of dates set by the user).
The chart I am trying to plot is as follows:
For each Unit Name, I have start and end date for the unit capacities, as shown in the PowerBI table as below:
4 sub questions:
How to plot these capacities over time? Maybe using some DAX functions?
Do i need the SSAS cube to solve this problem or can I do all the work inside PowerBI desktop? If not, is there a better way for example in SSRS?
Is there a way to make the x-axis time series dynamic as specified by the user?
Adding to this, after Leonard's response. After converting the OutageStartDateOrig, and OutageEndDateOrig values I tried to create the calculated column as suggested in the youtube link {enter link description here}. However, the DAX formula as shown in the video gives out a syntax error for me stating that the '.' is incorrect when specifying the range of dates. Any ideas for this? [Screenshot below]:
To create such a visual, I'd recommend an area chart (or stacked area chart) with the date on the axis, the unit name on the legend, and the capacity on the values. You could also do it as a stacked column chart too. However, then each date will be broken into discrete columns. See below image.
In terms of data manipulation, you'll need to convert the data with the date ranges you have above into a row for each individual date & unit. E.g. the first row, instead of being 11/2 to 13/2, would be expanded into 3 rows, one for each date.
You can do this in Power Query as you bring the data into Power BI Desktop, or in DAX after bringing it in. There are several solutions to this outlined in this thread (https://community.powerbi.com/t5/Desktop/Convert-date-ranges-into-list-of-dates/td-p/129418), but personally, I recommend the technique (and video) posted by MarcelBeug (https://youtu.be/QSXzhb-EwHM).
You'll also want an independent list of dates (with no gaps) to join the final date column to - otherwise your visual will skip dates when no units had capacity. By default, the chart will begin on the first date with data and end on the last date with data, so in that sense it is dynamic, but you can add a date slicer to give the end-user more control.
Area chart on top, column chart on bottom, date slicer on right filtering Jan-Mar.

Reporting Services - Two filters on the same chart Category Group?

I have sales data that I'd like to plot on my chart. However, at a specific point in time, we had a change taking place I'd like to ensure is clearly visible in the chart, preferably by dividing the sales data (which is stored in a single SQL Server column) into two different chunks, which would allow me to then treat them as different data series.
I used to solve this in Excel by storing the post-event data in a different column (by simply dragging them to a different column), and thus I was able to treat them as a different series (the blue and green line in the chart below. The red and orange line are pre-event and post-event averages):
I'd like to reproduce this effect in SSRS, but am not sure how to tackle it. I've tried using an approach where I added two category groups, both pointing to the date-time column, and applying filters to them (one <= the cutoff date, the other >=).
I then added my sales data twice, with the idea I could somehow connect them to the individual category groups, but that does not seem possible.
Has anyone tried anything like this before, or would have a different approach to achieve what I'm trying to get?
Thanks!
I managed to get this to work, and figured I'd share how to do it.
My dataset contains a field called DATEKEY, which stores the date in the format YYYYMMDD. It's possible to use this in an expression and evaluate the date for a specific row. In case the expression evaluates to true, we display the value. If not, we display a blank string.
In case we want to show the values prior to the date, the expression would be:
=IIF(Fields!DATEKEY.Value <= 20130601, Avg(Fields!My_NUMBER.Value), "")
The second series can then be made by reversing the symbol:
=IIF(Fields!DATEKEY.Value >= 20130601, Avg(Fields!My_NUMBER.Value), "")
The graph then looks like this:

How to pivot a line graph in SSRS

I have the following dataset:
Which creates the following line graph with Roletype as the category group and experience as the value:
How can I pivot this graph so Roletype is on the y axis and values are on the x axis?
I think you are actually using an area chart rather than a line chart, but both function the same way. The y-axis measures a numerical value. You indicate what is on the y-axis by placing something in the values area. If you use a field that isn't a number, it's going to try to sum it or count it or aggregate it in some way. You should use a different chart type to effectively display non-numerical data (see this article about choosing the correct chart type). If you want to assign values to your role-types and then display the description on the axis you could do that. I wouldn't necessarily recommend it as an effective way to communicate your message.
To show use the values for the y-axis, add the role-type values field to your dataset. Use that in the values for your chart and aggregate by avg. Follow the instructions in the accepted answer here. You basically set the number type for your vertical axis labels to custom and then add the list of possible values. This only works if you know exactly what values you are expecting.