Aggregating rows across in SSRS - sql-server

Sorry for the really noob SSRS question here. I am having trouble aggregating across my rows for my totals. Whenever I select my 3 columns that I need to aggregate (Rent,Exp,Other) = Total - It seems to sum down the instead of across.
I want to group my Total so I do not have 6 Rows of this Person with 6 different totals. I would just like 1 Grand total of the sums. Can someone point out what I am doing wrong here?
I would love this to be one consistent total for each unique Unit#
Thank you!

It looks like you are grouping by Unit which would be correct but also by something else (Base Rent?).
I think you have an extra Row Group that you need to delete. Just delete the inside group, not the related rows and columns.
If that's not the issue, post a pic of your report in design view.

Related

How could I only show the min in MS Access?

I am very new to access.
I tried to filter the data by using Totals and grouped the productPrice by min, however I get a range of all the product prices from min to max, here is a screenshot.
Also there is another column after MinOfproductPrice called storeName, I didn't include it for privacy reasons.
How could I make it so only the lowest price per product is shown? An example of what I am trying to do.
You could just do a summary query and do a group by with min (as you have done), but I suspect that the column you removed is to blame as it sounds like you want to be able to show that information as well.
There are a few ways to do this. In the first, you'll need to first create a summary query that gets just the product id and minimum price. Then, link this query back to your main table/query to get the additional columns like store, container, etc.
It is similar to finding just the most recent order row for each of your customers. The technique is the same. You can see a demo here:
https://youtu.be/5cnwHyn4dnI

Calculate the number of empty/blank fields in Power Bi

Hi I'm using a table which has a column Person Name followed by other columns that describes that Person i.e. Height, Age etc. The rows are filled in with the info.
However, some cells for specific people are not filled in therefore I would like to see which Person is missing details and what details are they missing as well as how many People are missing details altogether? Is there a way I can calculate/demonstrate that on Power Bi?
So essentially, count number of rows with at least one empty cell.
Creating a measure like this works for me
CALCULATE(countrows(tablename) , isblank(table(columnname))

Summing the Non-Null results in a matrix

I have a report that looks like the picture below. It is a matrix with person name on the rows and weeknum on the columns. What I need to calculate is the number of weeks that have data in the calls taken column. In the picture below it is the consistency column with the red numbers. I can't seem to get those red numbers to appear. Is there an expression that can count the number of columns that aren't null in a particular matrix. This report will be dynamically generated and the number of weeks will be totally different each time.
I would rather solve this in SSRS because I don't want to mess with my SQL too much but if no SSRS solution is possible I can post my SQL and perhaps solve it that way.
You need to create a column group outside of the last group. So in your example, Right click on the column tab above your efficiency column in the 23rd week. After you create this column, you can use a simple Count(Fields!CallsTaken.Value) in an expression to count the times there are values listed.
Reference SO question on Horizontal Totals.

PostgreSql correct number of field

I would like your opinion. I have a table with 120 VARCHAR fields where I will have to hire about 1,000 records per month for at least 10 years, with a total number of 240,000 records.
I could divide the fields into multiple tables but I'd rather keep it that way. Do you think I will have problems in the future?
Thank you
Well, if the data of the columns is following a certain logic, keep it flat. Which means that I would let it that way. Otherwise separate it into multiple tables. I depents on your data.
I worked once worked with medical data where one table contained over 100 columns, but all these columns where needed to get a diagnostic result. I don't remember, what exactly it was, because I worked with that data set some years ago. But in that case it would make it more complicated, if the columns would be separated into multiple columns. Logically the data of each column served a certain purpose so it was easier to have them all in the same place (the table).
If you put the columns all together just to be lazy, so that you have to call the table once, I would recommend to separate the columns into different tables to make it more comfortable to work with, and to make the database schema more understandable.

SSRS: repeat tablix left-most row group value on each row

I have a tablix in an SSRS 2008 report. It has two-level row groupings, and I'd like the value for the left-most grouping to continue to be displayed on each row. Eg, I get this:
group1 subgroup1 500.00
subgroup2 250.00
... but I'd prefer...
group1 subgroup1 500.00
group1 subgroup2 500.00
I can't seem to find the option for this. Is it a strange thing to want?
Thank you,
Bill
You can simply edit the upper reporting level, to be grouping on both groups at the same time, this will cause your desired behaviour.
I had to resort to this solution once, where "hide duplicates" didn't seem to achieve the desired result.
It's so simple...you have to right click on the cell in the DATA area (ex. where is displayed the value 500) and to click add COLUMN on the left. After this change the value in the new cell with the label field (subgorup1), also do this for the others columns that you want to add, but remember to do it from the DATA area. when you finish, delete the columns out of the data area, but keep the row groups. nice try!
Currently, what I've found to be a good way of determining whether or not the repeated values of a group would show up in a SSRS report, is to create the Groups and build your report based on the groupings. Secondly, take the groups fields and duplicate the column to the right hand side of the report. Making sure that you've included all the columns needed and totals are correct; delete the grouped columns. When you do this, you will get a popup asking if you want to delete the group or just the columns, chose columns - this will keep the format of the initial report and keep all of the total line as well.
If you select the row in question, there is a field called Hide Duplicates. Set this to nothing (null, space, etc) That should return the values you want.
I had this same issue and I solved it really easily.
It seems you have two row groups, by group and by subgroup.
What you have to do is to select the first column and group by group and by subgroup and remove the grouping by subgroup.
That should do the trick.
Put ROW_NUMBER() OVER (ORDER BY name ASC) AS Row# in each query as a serial number and hide the row in the SSRS Report.
See: https://learn.microsoft.com/en-us/sql/t-sql/functions/row-number-transact-sql?view=sql-server-ver15

Resources