Add percentage to SSRS report - reporting-services

I have a table in my SSRS report.
As you can see to the right hand side I have a column called %.
How can I calculate this?
The only way I know how is to take the [Count(AssetId)on the row above the total line (this is Textbox11) and divide it by the [Count(AssetId)in the total row (this is Textbox8). So basically how do I dive two text boxes together?
So basically I want to divide the 573 by 1025 (my total) in order to get a percentage.

Try this expression in the % column:
=Count(Fields!AssetId.Value)/Count(Fields!AssetId.Value,"DataSetName")
Change DataSetName by the actual name of your dataset.
Let me know if this can help you.

Related

Add total with different in percentage in SRSS Power BI report builder

I have a matrix with sales for district and store on the rows and different "time intelligence" on columns. I want to add totals. It works fine for values but for "YOY %" I don't want to sum the individual percentages of course - I want to have the total YOY for the values on the total row. How can I refer to these values? See the picture, the red value should be 109/77-1 = 42 % and not 183 %.
Any input is appreciated.
enter image description here
enter image description here
To answer my own question: I didn't figure out a way to referring to columns generated from calculation groups (is it even possible?) so instead I created all the measures (columns) as seperate columns in the dataset. Then I can easily refer to them like YOY %:
=( Sum(Fields!Actual.Value) - Sum(Fields!PY.Value) ) / Sum(Fields!PY.Value)
and the totals is shown correctly.

Calculate total by summing max numbers

I have a Matrix report that has two row groups and two column groups. There is column which has the calculation Max(Fields!AdjustedManning.Value) on the Row Group level as a subtotal. I want to add a total at the bottom which is outside of the row group to sum the subtotal numbers up. What expression can I use to do this? Effectively I'm looking to sum the max numbers
In the image the yellow box for design is where I need to put the expression and a preview of what I would expect it to calculate.
Design and Preview
You didn't show the rowgroup names so I'm guessing you have a rowgroup grouped by [WoLine] called Woline. Assuming this is correct then you should be able to use something like...
=SUM(MAX(Fields!AdjustedManning.Value, "WoLine"))
"WoLine" is the name of the rowgroup, you must include the quotes and it is case sensitive so adjust to suit your actual report.
What this does is get the MAX value within the "WoLine" rowgroup scope and then sum the results.

How to get total from another tablix column? (SSRS)

Hello awesome people of stackoverflow!
I need help with a simple problem with my SSRS expression.
How could I do this in SSRS?
As you can on the 2nd table below in my excel screenshot.
for each row we divide -BC5...-BC10 to column/row BC4. To get the desired results for table 2 in excel column total 2018 into column/rows BC17 upto BC22.
I've tried referencing my textbox like this
ReportItems!TextBox1.Value / ReportItems!TextBox2.Value.
But got me the wrong values.
Can someone please help.
Thank you!
If those two tables are in the same table/tablix then it should work with the expression that you wrote (try to type it instead of copy paste sometimes that may work).
=(ReportItems!Textbox7.Value /ReportItems!Textbox1.Value) * 100
If they are not in the same Table/Tablix then you should write like the following:
=(Fields!ColumnName1.Value / Fields!ColumnName2.Value) * 100
Format your cells.
There is not enough info to give you an exact answer but you should be able to work it out.
The first thing you need to do is get the context of the aggregations you want to work with. So click on the cell containing the number you want to divide ([Sum(DiscountOERestated)] ). In the row and column groups panel near the bottom on the screen, look at the row group that is highlighted. For this example I'll assume the row group is called grpCategory.
Now we need to do the same for GrossCatalogRestated. However, GrossCatalogRestated in the top tablix does not appear to be an aggregate. I'll assume it should be the total GrossCatalogRestated for the dataset. For this exmaple, we'll say the dataset name is dsMyDataSet. If it's within a row group, just swap the dataset name out with the row group name that it sits in, just like we did for DiscountOERestated .
So you expression would look something like
=SUM(Fields!DiscountOERestated.Value, "grpCategory") / SUM(Fields!GrossCatalogRestated .Value, "myDataSetName")
This will give you a deicmal result, somehting like 0.025 . You then just need to set the format property to say, "p1", so it shows as 2.5%
If this does not work, edit your question to show the expressions in the cells you are working with along with the rowgroup and dataset names.

SSRS Max Row Value across all columns

I'm busy with a report to show maximum value for a group, however when I do a MAX function I only get the the same result as the current row and I require it to be the same/highest MAX value in all rows. I need to do this on the report itself as the data set is MDX.
As you can see below, I require the max column to be 67% on all the rows.
Report Screenshot
You need to include the scope in your expression, something like
=Max(Fields!ColA.Value / Fields!ColB.Value, "myDataSetName")
or
=Max(Fields!ColA.Value / Fields!ColB.Value, "myColumnGroupName")
Without seeing the full design I can't tell you what it should be but the first option above would give you the max amount over the entire dataset and the second example would show calcuate this within the columngroup.

SSRS percentage of a total with column groups

I apologize in advance if this is not enough info or if it is confusing (This is my first post to the forum and it's a little hard to explain what i'm trying to do). I have been researching this for a couple days now. This article comes really close to what I need, but this person did not have column groups, just a a single column with an output: SSRS percentage of a total.
Consider this layout and groups:
The idea is to provide the percentage of the total records per PrimaryPayor per Company and then break it out by Year-Month.
This expression:
=CountDistinct(Fields!ID.Value, "Primary_Payor") / CountDistinct(Fields!ID.Value, "Company")
Results in this output (The first image is my output, the second is the desired output):
As you can see, the percentages do NOT group by Year-Month, instead just provides the total percentage of IDs per Payor per Company and repeats it for every Year-Month column. How can I get the percent of Total IDs per payor, company, and month as it shows in the second result image?
After editing my question, I thought of something I hadn't tried.
If I just use =CountDistinct(Fields!ID.Value), this gives the total count for each payor, company, month, plus, I added a Total row.
Then, if I reference those textbox values (instead of trying to calculate the percentage on the fly) divided by the total row, I get my results. I just had to add a column inside of the column group. I should then be able to just Hide my "total" column and display only the percentages.
=ReportItems!Textbox50.Value / ReportItems!Textbox35.Value
Here is the output (with the total counts and then after hiding the "count" column):
Final Results
Try:
=CountDistinct(Fields!ID.Value) / CountDistinct(Fields!ID.Value, "Company")
I removed the Primary_Payor scope leaving the function calculate the count in the cell scope Primary_Payor and DOS_YrMo.
UPDATE:
=CountDistinct(Fields!ID.Value) / CountDistinct(Fields!ID.Value, "DOS_YrMo")
Let me know if this helps.