Grouping by week and daily breakdowns in SSRS - sql-server

I have a query concerning SSRS and displaying data. My report will consist of a weekly breakdown of week numbers and sum of hours. Showing something like this
12/06/10 351
19/06/10 342
26/06/10 399
And then on clicking/toggling the week data cell(s) a breakdown by day will be displayed. I have completed the daily breakdown and written a function to return all weeks in 2010 but my difficulty lies in grouping by the week.
In the layout tab for SSRS, I have created a group on the week value and date value, and have the week value appearing in the group cell, but it creates an additional blank line below each day breakdown.
Could anyone help me?
Thanks very much

Related

How to get a YTM calculation instead of YTD in Google Data Studio

I have an earnings table in my Google Data Studio report from January 21 - YTD.
But what i want is a table that shows me YTM (so this year until last month) Jan-21 til Sep-21 and that dynamicly on 1st Nov, Okt-21 is added to the table, and on 1st dec Nov-21
is added etc.
Because the Total YTD value is other wise too high, due to cost being booked at the end of the month and earnings through the month.
Filters wont let you do it dynamicly,
date range filters same,
always possible to do it manualy with date range but this i cannot ask from my client.
any suggestions??
Kind regards
I found the answer,
i left the question for when someone else wants to do it,
it is actualy simpel fixed by using advanced date filter and then leaving the start date on 1-jan, and end date to today minus 1 month.
this gave me the exact result i needed yt last month

SSRS Expression - Show last 30 Days from Today, without changing SQL Query

I have 3 tablix, each on one page. The first tablix shows result for months, the second tablix shows result for weeks and the third tablix for each day.
Now I want to limit the day-view to the last 30 days. Otherwise, it's just to much information.
The current expression for the date is =Fields!Date.value
Is there a way to limit the day-view to show only the last 30 days from today without changing my SQL query?
Thanks in advance.
Setup a filter on your tablix:

Query data by month and average in SQL Server

Hoping someone can point me to the right direction here. I'm trying to make chart (from DB data) of average of daily production but in a monthly basis. so basically I have 30 rows of daily production and need to average them which I have no problem there, the AVG works fine but my issue is my x-axis which is the month. anyway to show 2016-01-01 7:00:00 to 2016-01-31 7:00:00 and show it as just the month (January in this case or even 1 works)?
Basically what needs to happen is I need one value in my x-axis and one in y-axis. x-axis is the month of the year and y-axis would be the average of production for that month. any ideas how I can tackle this?
Hope this helps
Select xAxis=month(someDateField)
,yAxis=avg(someValueField)
From someTable
Group By month(someDateField)
Order By 1

Crystal Report for Average Tickets revived by hour per month

I need to pull a report that show the avg tickets we receive per hour for a month.
So far I've been able to come up with:
SELECT "TASKS"."WO_NUM", "TASKS"."TASK", "TASKS"."COMPLETED", "TASKS"."OPENDATE",
"TASKS"."REQUEST", "TASKS"."RESPONS"
FROM "TRACKIT9_DATA"."dbo"."TASKS" "TASKS"
WHERE ("TASKS"."OPENDATE">={ts '2015-09-01 00:00:00'} AND
"TASKS"."OPENDATE"<{ts '2015-09-04 00:00:00'})
However this only show the number of ticket we received each hour per day and the report is a mess if I ask for a full months worth of data.
How would I go about asking Crystal Reports to Pull the data then Group it by Hour then give me an average?
You can do this in crystal report.
Group by month then create a formula and write as
Hour(database date field)
Use this to group as a second group after month, now try to manipulate the data

SSAS -> AdventureWorks Example -> Using the browser to splice a measure by week, shows results that have two of the same week records?

I have been working on a cube and noticed that when I am browsing measures in my cube by weeks, I am getting an unexpected result, but first let me display my current scenario. I am looking at counts of a fact load by weeks. When I do so I am getting results like these. :
Weeks | Fact Internet Sales Count
2001-07-01 00:00:00.000 | 28
2001-07-08 00:00:00.000 | 29
....and so on as you would expect.
Further down I noticed this. :
2001-09-30 00:00:00.000 | 10
2001-09-30 00:00:00.000 | 24
As you can see, it shows the week twice with different counts, when you add these counts together it is the correct number of counts for this week (i.e. 34).
I am just confused why it is showing two weeks, when I look at the data in sql I can see that the difference in data between these two is strictly the month in which these dates fell (10 in the earliest month and 24 and the later month in any example).
I initially saw this in my original cube that I created on my own, in turn, I pulled up trusty adventureWorks practice cube and found that it was present in that cube also.
This is due to the fact that within this date hierarchy, the lowest attribute in the hierarchy was date not week. Therefore, there was always a split for weeks by date. This can be alleviated by making a date hierarchy with week as the lowest portion of a date hierarchy.

Resources