SSRS Count Rows of Previous Group (Table in Matrix) - sql-server

Using the sample below, I am looking for a way how to count the number of rows in the table in the previous group. My report is setup using a Matrix and a table ("Tablix3") in the data region of the matrix.
The column groupings are called "DayOfTheWeek" and "AMPM".
In the area with the blue box around it, I need the PM group to count the number of rows in "Tablix3" for the AM group on that day, which is 2. When the value is greater than 1 I will use expressions to alter the background colour accordingly as the bottom right pink background shouldn't be there.
I am using SSRS 2008.

Unfortunately, no. You have to do it in the query.

Related

In Finicast, I am unable to apply my formula on a group of cells in my pivot table

I was trying to build a periods model using Finicast. I am stuck at this step where I apply a formula to the cells with dimension 'Fcst' and 'Revenue' in my pivot table.
Based on my understanding, if I select Revenue cell for month of Jul22, the formula THIS("idx") should have been applied and the cell should contain the value 7 instead of 0. I have other formulas applied to this cell. But I have my rev_fcst formula top precedence to apply on this cell. Irrespective of which order I apply the formulas in, in this selection, the value for months & Revenue cells remain 0.
What am I missing here?
I have added images of my formula bar, pivot table, and dimensions
The formula bar
The rows highlighted by selecting Fcst and Revenue
periods table for reference
Looking at the image you posted, you have a set of "hardcoded" 0's for Jul22, Aug22 and Sep22. Click on those cells and press the Delete key to remove the hardcodes, and then the underlying formula will show-up again.

How to count unique occurrences with criteria in excel

I'm using the below array formula to count the unique occurrences of text in column C using the agent name in column G as the reference. This is giving me multiple issues.
=SUM( --(FREQUENCY(IF(G3:G100000 = J5,MATCH(C3:C100000,C3:C100000,0)),ROW(C3:C100000) - ROW(C3) + 1) > 0))
Depending on the data set I'm using multiple agents will return a #N/A result and I can't figure out why.
Each dataset I'm using is 20k to 30k lines, so the formulas take a long time to process.
Any ideas how I could do this faster or better? Also any ideas why some agents get bad returns?
I am assuming that you are looking for the number of unique combinations of columns C and G.
Create a pivot table and check the box to add this data to the data model.
Drag both column headers to the Rows section, also drag one (of those same two) into the the values section.
click on the the field in the values section > value field settings > summarize values by > choose Distinct Count. This removes all duplicates.
Click the Row Labels filter and uncheck the blanks.
You can drop in new data then right-click on the pivot and refresh to see the new results. See the image.

how to mark cell when the row data is changing on ssrs

I have a SSRS report.
I have an order columns.
I want to mark both rows where order is changing in yellow
How to do like this?
Give this a try. Make a Parent Group on your STR_ORDER_ID. Don't create a header and remove the column only (after you create the group). The only issue here is that you'll get the coloring on the first and last row of the report.
=IIF(RowNumber("GroupName") = CountRows("GroupName"), "LightBlue",
IIF(RowNumber("GroupName") = 1, "LightBlue","Silver"))

SSRS SQL 2008 R2 - How to reference the value of other groups?

I have a matrix setup in the report designer in BIDS. Below is a screenshot:
All I want to do is use an expression to multiply the value of COL GROUP 1 by COL GROUP 2, for each ROW GROUP as illustrated in red. What would be the best way to achieve this?
EDIT: For clarity, each column group is filtered to only return a single value per adjacent column group
On a per row basis, you can use..
=ReportItems!ColGroup1Value.Value * ReportItems!ColGroup2Value.Value
This assumes that the textbox which contains the value for "ColGroup1Value" is named ColGroup1Value.
See https://learn.microsoft.com/en-us/sql/reporting-services/report-design/built-in-collections-reportitems-collection-references-report-builder for more information about ReportItems.

SQL Server Reporting

I have a Matrix style report that I have created and it is currently displaying a total count of items for a series of companies throughout a 12 month period.
[Company1] [Company2] [Etc....] [Total]
[May] (Count)(Percent)
[June]
[Etc]
[Totals]-----------------------------------------------------
The last column total is a subtotal function and automatically adds column counts based on what is in the Column group which in my case gives me a total for both (Count)(Percent)
I only want to show <Count> but I don't find any method of modifying the parameters for the subtotal function.
The only way I found was to add an additional matrix to the right hand side of the main but only display total counts. Kind of hokey and I will refrain from implementing it at this time.
Any suggestions?

Resources