SSRS Report Group by destination, then by Year , then by Month and then by day - ssrs-2012

I am attempting write a report with a summary by location. However, the groupings are duplicating. Need to see single location name with total entries. In the example it should show Athens in 2023, month 1 and day 2 I should have a total of 2.
Required output
I grouped by destination (parent group), then by year (parent group), then by month (parent group), then by day (parent group). I want to see each location, by year, month and day as a single total entry. Instead it is splitting out each entry.

It looks like all your fields are inside the details group (the lowest level), you can see this by the the horizontal lines in the row header. You only need a single group that groups by location/year/month/day unless you also want total by month and year?
If you only need the day level totals then remove all rowgroups except 1 and then edit the remaining row group to group by the 4 fields as required.
If you want to retain the location/year/month groups so you can add totals to those, try deleting the details rowgroup.
If this does not help, explain what totals you need and show the rowgroup panel (below the main designer window)

Related

Amazon Quicksight - Dynamic filter latest week by default

I think the question is fairly simple. I would like to have a dynamic filter on Quicksight. I have the column week which is a number (3, 4, 5 and 6) for example. The data is refreshed every week.
We want to show only the latest week by default (out of weeks 3, 4, 5 and 6, I want to filter by default on 6), but then the users can select if they want to see more weeks.
The week after, the default filter would be 7, and so on.
Is there a way to tell the filter to automatically filter by rule of MAX(week) or something like that?
It would be very helpful. I have other alternatives but they are not that great.
I would choose a date field that I understand that must exist in your data and then create a dynamic filter on that date field.
You create filters on date fields by selecting the filter conditions and date values that you want to use. There are three filter types for dates:
For your case, you will have to use
Relative – A series of date/time elements based on the current date. You can filter records based on the current date and your selected unit of measure (UOM). Date filter units include years, quarters, months, weeks, days, hours, and minutes.
Use the following procedure to create a relative filter for a date field.
On the toolbar at the left, choose Filter.
In the Filters pane that opens at left, choose the plus icon (+), and then choose a date field to filter on.
A new filter is added to the Filters pane.
In the Filters pane, choose the new filter to expand it.
For Filter type, choose Relative dates.
Choose a unit of time (week for your case).
Choose how you want the filter to relate to the time frame. For example, if you choose to report on weeks, your options are previous week, this week, week to date, last N weeks, and next N weeks.
If you choose Last n UOM, specify a number for your range—for example, last 2 weeks, or last 1 week.
Second solution.
Add Filter
Choose week
Type Top and Bottom Filter
Show Top write 1
By week ( use max aggregation)
Pasting an image from an analysis that I do the same thing for integer column year

How to show different groups in same matrix where no parent or child relationship

I am tasked with reproducing a spreadsheet in an SSRS report to save hours of Excel spreadsheet work. I have done all the calculations and got them into a single dataset however I am not able to work out how to display in the same table/matrix.
My spreadsheet looks like this:
Column B is a text column used to describe what the figures in each group are showing. Col C is 'Region' grouping.
I have got this far with my matrix - grouping by region and month. This gives me rows 3 to 8 incl of the spreadsheet.
But I am not able to work out how to add the next group of data (rows 9 to 12 in the spreadsheet) into the matrix. Each group of figures would use an expression to pull by a different field so only using single dataset: I still want it to use the region and month exactly the same as the top group. There is no parent or child relationship between the labels in col B in the spreadsheet.
I have tried adding an adjacent group below but it is still trying to keep it as part of the top group.
Is this at all possible?
do I need to have 6 different matrix, placing them together and just hide the month names in the bottom 5?
This is an extract of the data results. The top group counts the uniques customer id, the second group counts the unique sale id, the 3rd group totals the net sale value, the 4th group totals the profit value, the 5th group calculates the total sales and divides by the number of customers, the 6th group calculates the total sales and divides by the number of sales.
It looks like you will have to have 6 separate tablix and amend the aggregate function and field for each tablix

Group by name, then sort by oldest date

How can I group by names, and then sort by oldest date? Some names have multiple dates so I want to keep the oldest date first and suppress any other date associated with that name.
A 1/1/2016
C 8/5/2017
B 10/2/2017
C 5/6/2017
A 10/6/2012
B 5/15/2013
A 2/5/2017
B 4/6/2017
I tried creating a group for each name and date, then sorting by ascending order. But when I place Group 2: Date above Group 1: Name, the names are no longer grouped together.
There are a few ways to go about this. Crystal makes use of SQL to get your data in the first place, so you're able to write your own SQL for record selection. And it's rather easy to write a statement that will only return the oldest date per person, then arrange them by date.
If you prefer to do it in Crystal, you can do either of the following:
Group by Name, Sort Ascending. Then make a subrgroup by Date, Ascending. Use a running total (suppressed so you don't see it) to count the number of records, but reset this count on change of Group A. Then suppress the Details section every time this running total is greater than 1.
Group by Name. Don't add a second group. Use a subreport that takes the current Name in as a parameter, and returns only the oldest date on record for that name. (Hint: Turn off Can Grow and limit the subreport to one row.)

SSRS Matrix with Blank

I am making a matrix of the TOP 10 users per month. I am using ROW_NUMBER in the SQL to identify the top 10.
Unfortunately, when there isn't 10 users for a given month, the first users repeats with a blank count.
How can I fix this?
The row group is grouping by my ROW_NUMBER. I am column grouping by month and year.
There is only 1 record for JULY but it is repeating on the other rows where I think it should be blank.
I bet you need to add a group filter to your column group to filter for nulls. Expression=(Fields!HasDataID.Value=nothing)=false

SSRS Matrix Bespoke Headers (Still from datasource!!)

I have to create a matrix in SSRS to detail the number uses leaving an organisation.
The columns will all represent spaces of time spanning 1 week and the rows will all represent departements in the organisation. The detail portion will be a count of people who have left that area in that week.
I have a leaving date field in the DB but nothing that flags the specific intevals I have been told to use. That means that as the matrix is, it counts each of users that have left a specific department however the date range columns is 1 day, not 1 week. Is there a way to force the column headers to respect the week intervals I want given that they are currently coming from the dataset and are not hard coded?
Firstly try to manage your data in sql itself by using Group By with date and making each group as one week period. That way you can manage to get all data in your required format
I don't know what is your columns so I am just showing a way to get the week groups from table and get the count of the people
SELECT DATEPART(wk, datevaluecolumn) weekno
, SUM(peopleleavingcolumn) totalvalue
FROM yourTable
GROUP BY DATEPART(wk, datevalue)

Resources