How to display data vertically in matrix control SSRS - reporting-services

I have an ssrs report which display data in a table just like image1.
I need to display data vertically in two tables to avoid extra pages. Just like image2.
Currently I have tried matrix control with row group and column group but it is displaying data horizontaly see image3.
Below are the group expression.
Row Group : =ceiling(rownumber(nothing) / 2)
Column Group : =ceiling(rownumber(nothing) mod 2)
Can anyone suggest to me how to display it vertically just like img2.

Finally got a sollution for this, posting it here as might be someone else may require it. Use bellow expressions for groups.
Row Group : =ceiling(rownumber(nothing) mod (Fields!RecCount.Value / 2))
Column Group : =ceiling(rownumber(nothing) / (Fields!RecCount.Value / 2))
Where RecCount is the total row count of data set. This will divide the result set into two parallel tables. If more or less then two tables are required then increase or decrease devisor accordingly.

Related

How to sum a row based on the total group in SSRS

Im facing an issue whereby how to sum the % for each of column based on group in SSRS by using expression. Refer my use case below
I have one outcome which all the product with a percentage result. Refer to my screenshot
enter image description here
Below are my SSRS template.
enter image description here
How we get percentage result. Example: Product PG is based on 13(based on total PG) divide 51(total Inv)
Issue: I want to sum each of percentage result for all the item Example 25% + 41% + 4% and etc to populate under excel column V6.
Therefore i need some ideal how to write in SSRS expression or it only can done via query.
Seek for any ideal how can this be done.
You can try as below since you have use static columns:
=(Sum(TotalTintCash)/Sum(TotalInv)+Sum(TotalTintFOC)/Sum(TotalInv))
And then, you can provide number formatting to percentage

How to sum cells across two matrices in different datasets?

I've researched previous answers, nothing seems relevant to this question.
I have a simple matrix, showing data from "Dataset A" - counts in the rows and month/years in the columns.
I have a second matrix, showing data from "Dataset B" with the same layout.
I wish to create a third matrix, or add a total line to the second matrix, showing the sum of each month's figures. See screenshot;
Image showing dataset A (orange header) and dataset B (blue header) and items I wish to sum
I have tried adding a new row to the dataset B matrix and using the following formula -
=SUM(Fields!Counts.Value) + Sum(Fields!Counts.Value, DatasetA")
However this fails to take into account the month groupings from Dataset A, and instead sums the correct number from Dataset B with the total number from Dataset A - not just the figure for the appropriate month.
How can I make this sum work, ensuring that only the relevant months are summed across both datasets?
Thanks!
Update: Using the LOOKUP function I have made a little progress but still have been unable to sum the two numbers (See image, below). I tried the following lookup expression to build the total;
=Sum(Fields!Counts.Value) + LOOKUP(Fields!ReceivedMonth.Value, Fields!ReceivedMonth.Value, Fields!Counts.Value, "DatasetA")
But it appears that I'm unable to SUM the Fields!Counts.Value, "DatasetA" inside the lookup (it throws a syntax error), so the total result is displaying at the total from DatasetB plus 1.
Image showing result of LOOKUP - not quite correct

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.

How can I sum "Expr" in bottom of the table in SSRS?

I'm doing such a thing;
=Sum(Fields!TOTAL.Value) - Sum(Fields!IND.Value)
In cells, so this is end up with expresion "<<'Expr'>>", that means I'm finding net worth price - discount for each saled products, after that I want to sum all of those product's sales on bottom, like
=Sum(Sum(Fields!TOTAL.Value) - Sum(Fields!IND.Value) )
Any chance for that? I also tried like;
=Sum(ReportItems!TOTALBOX.Value)
But not work either.
Edit;
I'm doing something like that but on final, I want to sum those values which "<>" created.
Thx.
Since your data is in a Column Group (by [DEFINITION_] - the 3 columns with the line above them) you can create a total column using the same formula. The Total will SUM all the different DEFINITION groups for each [NAME] group.
You can add a column Outside the group and create your total column with the same formula
=Sum(Fields!TOTAL.Value) - Sum(Fields!IND.Value)
If you created everything correctly (and you're lucky), SSRS might be able to create the Total for you by right clicking on the cell and Add Total.

Refer to entire column in Access Query

I am trying to calculate the percentile of an entire column of data in an Access Query using a custom function that refers to the Excel Object Model. Here is the code I have:
Public Function myPercentile25(x As Double) As Double
myPercentile25 = Excel.WorksheetFunction.Percentile(x, 0.25)
End Function
I've added myPercentile25 function to the Query column in Design View where x equals AgedSalary using the following:
25P: myPercentile25([AgedSalary])
The issue I am having is the Query seems to be only taking the percentile for each individual row and not the entire column. I am more familiar with Excel where I would refer to column as AgedSalary:AgedSalary. Is there a similar syntax I can use in Access to take the percentile of the entire column?
Thank you.
It's easier to work with TOP in Access when you want a percentile:
select top 25 percent
[agedSalary]
from [yourTable]
order by [agedSalary];
The above query will return the top 25% of the records. If you want the top value (i.e. the 25 percentile) you can nest the above query:
select max([agedSalary) as percentile
from (
select top 25 percent [agedSalary]
from [yourTable]
order by [agedSalary])
) as a
If you want to do this using the design grid:
For the first query:
In the "Columns" area (the lower half of the design view), below each column, there's an "Order by" combo where you can select "Ascending" or "Descending"
You can set the TOP value in the property sheet of your query; in the Design ribbon click the "Property sheet" button
Once you are sure your query works (i.e. it selects the top 25% rows), you'll need to open the SQL view, cut the generated SELECT instruction and write this:
select a.*
from (
-- Paste HERE the SELECT you've just cut
) as a
Then return to the design grid, remove that * from the column grid and drag the desired field to the design view. Click on the Totals button in the Design ribbon (that big Sigma), and below the just dragged field, in the "Total" row select "Max"