Display character in table cell based on calculation results in another cell - reporting-services

I have a table in SSRS 2008R2 that calculates a percent value for two numbers, and places an asterisk (*) in the last column if the percent value is below .65. This works fine in the individual rows. However, I have to calculate the percent value for totals rows as the table is rendered (1st row, Percent column). I need to use this value to determine whether the asterisk in the '<65%' column will show. Can this be done, or do I need to go back into the code and derive the value there?

The answer to your question depends on whether the calculated cells are inside the scope of the group on which you are aggregating. If they are inside the group scope, it is possible to derive these values in SSRS. If not, they have to be pre-calculated in the underlying dataset. This is because referencing of cells cannot be determined when a source cell's position relative to the derived cell is dynamically generated.

Related

SAP - Web intelligence Cell Reference

I have created 7 cell references in WEBI with the purpose of averaging seven cells (for a week), the referenced cells contains a percentage value eg 99.25%. However, when I calculate an average on the referenced cell I always return a 1, so it seems the referenced cell is storing as a 1 rather than 99.25%
Any ideas how to navigate this?
Thanks
You need to format the cell. The percentage is being held as 0.9925 and rounding to 1. Right-click on the cell and change the number format to a percentage to make sure this is the case, then fine tune it to display exactly how you want if needed.

SSRS Row visibility based on another row's visibility

My SSRS report has the requirement to filter the report based on a cashier's variance to balancing to 0. My variance is a calculation based on two different datasets and values within those data sets.
I've used some custom code in order to pull some of the data from a second data set and then I use ReportItems! expressions to calculate the variance with it all combined in one chart. The requirement is to only show those cashiers that are off balancing by more than +/-$10. I've tried to put the ReportItem! expression in the filter for the tablix, but the filters won't take a ReportItem! expression. My next thought was to just hide the rows that don't meet my criteria, but when I do this one of my toggled rows unhides itself because it's parent is hidden now based on my row visibility expression. Is it possible to hide all child rows of hidden rows? Ideally, I'd turn this into a parameter so that the end user can change the range of what data to look at.
Did you try hiding the Group instead of the rows? Usually if there's a child within a group that is hidden, the child will hide too...
I'm not sure why, but I had to put group visibility settings on it as well as the row where all the other row groups I only had to do the group.

add variable number of empty columns to a tablix

I have a tablix with a column group so that it will create a column for that field provided any row has data for that column.
I need to create a version of this report that contains some empty columns on the end.
I want the number of columns to be added to be based on some factor of the non empty columns with some min/max constraints also. (my question is not how to get the number of columns required)
so far i've tried.
1 - adding individual empty columns to the tablix and setting the visibility condition on each column.
a bit long winded and a bit of a faff.
2 - creating another column group and grouping on the same field, this creates
cant vary the number of columns returned.
am i missing a simple way of adding x empty rows or columns to a tablix? where x can be calculated somehow from the values in the dataset.
You will have to fib this scenario in your data. The column-wise grouping works with known data including those falling in the column group value with null values. There is no way to grow your groups without data unless you add some column group footer logic that would be pretty weird.
I would look into producing phantom NULL value records that will push out your columns.

Divide Fields by Sum to get Percentage SSRS

I wanted to figure out a way to get the percentage by using the data divided by the sum of the overall data.
For example:
[NumberofClients]/[Sum(NumberofClients)]
For each row it should have a different percentage based on the number of clients.
However, when I execute the expression above I always get 100%.
When you're apply the Sum, it will be calculated in the current Scope - if this expression is in a Details row, it will only ever be looking at one row, which explains why it's always 100%.
You need to use a Scope parameter to get more than the current row in the Sum, something like:
=Fields!NumberofClients.Value / Sum(Fields!NumberofClients.Value, "MyDataset")
Which is giving the % value for the particular row compared to all the rows in the Dataset, which seems to be what you're after.
You can change the Scope parameter to be a group instead of the whole Dataset as required.

Repport Builder - SSRS: How do you reference a value in column group

I have a dataset that is generating several columns when using the column grouping for one of the fields. Please see image below for example:
I need to add a additional column and reference the value in column CD for each row so that I could calculate the ratio of value for CD to Total for that row.
I have tried using
=SUM(IIF(Column2="CD",Column3,0)) which did not work. There must be some alternate way to referring to the column group which I am not aware of.
This works when an additional column is added off of the column group and not past the total column. When adding column, you should see the option of inside or outside the group. As long as you see that, you should be able to use the formula above and reference a column value.