need help on grouping and row number - reporting-services

I'm trying to create an ssrs report. Here's the data i have:
original data
I need to grouping and numbering based on specific column but ignoring the Entire entry row, the final result should be like this.
result
What's the grouping should be on case like this so i can put the number just like in my screenshot ?

Insert a matrix , row groups for Warehouse, Column1, Column 2
and for column groups use Amount, insert amount field with aggregate function of sum.
to add in the No. row, you will need to insert a empty column between column1 and column2 and insert an expression similar to:
=RunningValue(Fields!Test_case.Value, CountDistinct,"Tablix3" )
Whereby Fields!Test_case.Value is equivelant to Column1 and Tablix3 is equivelant to your matrix.
Example of design and report outcome, just need to correct expression for the No. column:

Related

Tableau creating calculating column for whole table

Is tableau has a opportunity to create calculated column for table? For example here are 2 column with some number and I want to make third column with formula like this
If(column1>column2;column1;column2. I see there is option to create calculated field with summarize columns but I just want to compare them.
If you only want to create a new column storing the max between 2 original column, you just need to create a calcultaed field like the following:
if column1 > column2
then column1
else column2
end
EDIT
Or even simpler
MAX([column1], [column2])
There are two (overloaded) functions named MAX(). With one argument, MAX() is an aggregate function that operates on a column of values and returns the maximum - just like other aggregate functions like SUM(), AVG() etc. With two arguments, MAX() is a record level function that operates on an individual data row and returns the larger of its two arguments. MIN() behaves similarly.

Sort by specific Column name Matrix in SSRS

I have multiple tables with some rows and columns in sql.
Columns are like (Key, column1,column2,column3), I did unpivot tables in sql.
And got dataset in ssrs like : TableName, Key,ColumnName,ColumnValue.
I've created multiple matrixes like below structure for each table by setting filter = "TableName":
----------------------
Key | [ColumnName]
----------------------
[Key] | [ColumnValue]
------------------------
Question: How I can do sort (order by) based on column in SSRS matrix. I have as I said multiple matrixes. 1st matrix I want to sort by Column1, 2nd matrix by Column2, 3rd Matrix by Column2 and Column3 Where I need mention to sort by certain column name?
So far I've tried to sort my first Matrix.. tried it with "Row Group Properties ----> Sorting ---> Expression : SUM(IIF(ColumnName="Column1",ColumnValue,0)), but it didn't work. Also I've tried COUNT instead of SUM. No luck so far.
I solve it by this...
So if we want to get like "Order by Column1" then after unpivot Put your dataset in the matrixes. Go the the matrix which you want to Sort by specific column (in my case column1) Row group properties---->Sorting----> Add---> Expression:
MAX(
IIF(Fields!ColumnName.Value="Column1",Fields!ColumnValue.Value,Nothing)
)
and if you want to ad also Column2 to this matrix to sort, just after set 1st expression hit "Ok" and in the same window click --->add---> expression----> same query but with your column name (ex. Column2).
Hope this will help to some one.

SUM of same data in access report based on 2 column

How can I count how many rows have same data in 2 columns on an access report?
This report is always changing based on selections that are made by the user in a combo box and a list box. I want to do the coding in the report. is it possible?
I'm assuming you are looking for rows that have duplicate data across columns 1 and 2. So if in the first row column1 = a and column2 = b, and in another row column1 = a and column2 = b, then we have a duplicate row regardless of other columns. We have found 1 duplicate row.
Access has a find duplicates wizard under the create- query wizard tabs. Playing around with the wizard I got a count of rows with the same data. we subtract 1 to get the number of duplicate rows. Then I had to go to the sql pane of the designer to quickly wrap that query in a sum to get SumDuplicates. The resulting sql which give the total number of duplicate rows is:
SELECT Sum(Duplicates) as SumDuplicates
FROM
(
SELECT Count([column1])-1 AS Duplicates
FROM Table1
GROUP BY Table1.column1, Table1.column2
HAVING (((Count(Table1.column1))>1) AND ((Count(Table1.column2))>1))
);
Adust column and table names to fit your database structure

How do I compare all rows in a columns incrementally but also group them at the same time in access?

This is the table that I would like to compare the values within the row groups incrementally however I would not like to compare rows amongst groups as it would come with negative values.
How do I achieve this on the same table? I am unfamiliar with subqueries
It sounds like what you need is a Calculated Field added as a third column to your table.
Instructions:
Select the drop down menu next to "Click to Add" to create a new column.
From the choices available select Caluculated Field and then Number.
The Expression Builder will open.
All you need to do from there is select the column you want to use as your primary number (in your case Number) from the Expression Categories, insert a minus sign, then select the number you want to subtract from the first number (in your case Group), again in the Expression Categories.
Name the column you created whatever you would like.

Count calculated Column in SSRS

I have SSRS report where in I am using table with 7 columns (Date, Job ID, Job Name, Status, Output Count, Expected Count, Flag). Out of 7 columns , 4 are directly coming from dataset. Rest three (Job Name, Expected Count, Flag) are calculated columns. I am getting their values from either SSRS custom code or expression. I want to count those rows where Output Count and Expected Count are not matching. Also I have Flag column where I am using Background Color property to check if values are matching or not. So even if I can get count of rows having Red background at Flag column will also server my purpose. Please help me in achieving the same.
You can create some new fields for your dataset to handle calculated values. Then, in your report, you can add some groups and add count or sum values on the table.