I have a table like this one below. I have one dataset which returns data like this:
Day Hour Title
-----------------------
Monday 2 Title1
Monday 4 Title2
Friday 5 Title3
.
.
.
.
I need to fill the table depends of values in dataset, ie. first row of dataset will take place where first column(Monday) intersect with second row(2.).
How can I do this task.
I am using SSRS 2008.
Use a matrix.
See here also see this similar question
EDIT: This interesting blog post shows how you can build a calendar in SSRS.
Problem solved
First, on database, I am creating two Common Table Expression or CTE, for days and hours respectively. Then, I am make CROSS JOIN between them, and thus form a one relation. Then I make left join with rest of needed tables, to get values (if exist, of course) for each combination from CROSS JOIN.
On reports, I am create matrix, related to dataset, which is linked with previously created stored procedure. For column group, I choose days, for row group I choose hours, on intersect I place specific values.
Really simple, but great job is done with cross joined two CTE's.
Related
I have an SSRS report, where there are groups (in this case Mills 1-4), each one having a product milled and the tons produced (for example).
I need to add up the 4 groups (ton produced), wherein each group, the product = this.
Like if Mill#1 made product X and Mill#4 also made product X, then I need to add the "tons" produced fields for these two.
If all the Mills made the same product, then the sum would be for "tons produced" for all 4.
Example below:
I would want to add tons produced for the two rows in green where the product = M120
Example of data
"
To make it work the way you want, you'll need to use a Matrix with the columns as your product.
You'll need to add a matrix. Use the MILL for your row column grouping. Use the Product as the Column grouping. Add the TONS as the Data. You can right-click on the TONS and Insert Column -> Inside Group if you also want to add another column - say for the Hours.
Left click on the Tons and you can automatically add the Column Total and Row Total.
For more info, see MS Docs - Create a Matrix.
so I'm very new to Access - just started learning it this week. I have data comprised of a bunch of policy numbers with corresponding ratings and premium values.
What I'm trying to do is create a query table that aggregates this data by rating (=1 or >1), this is the part I can't figure out. In design mode, I have put criteria =1 or >1, but it's not doing anything; when I switch to datasheet view, it just lists all of the ratings instead of two boxes that say =1 and >1. If anyone could give me insight on how to do this, I'd appreciate it!
From what I understand after reading your question, you want a query that shows two columns, one that counts the records with a rating of 1 and one that counts the records with a rating of greater than 1.
The best way to do this is to set up two expression columns, both wrapped in a count as you can see below:
SELECT Count(IIf([Rating]=1,[Rating],Null)) AS [=1], Count(IIf([Rating]>1,[Rating],Null)) AS [>1]
FROM tblSortRating;
If you have any questions or I've misunderstood your question leave a comment and I'll get back to you.
I have 6 Datasets each one is the same query but has a different WHERE clause based on employee type. They generate 6 tables. At the top of the report there is a summary table which uses reportitems!textboxXX.value to grab the totals for 2 particular fields from all the tables. I'm also using a StartDate and EndDate parameter. Each reportitems! expression in the table comes from a different dataset in the report if that is relevant.
When I run the report using dates from yesterday back to the 9th of May I get the desired output.
But when I go to the 8th I get multiple rows all the same.
and as I go even further back I get even more rows of the same information. To my knowledge nothing interesting or different happened on the 8th of May and the tables further down the report look exactly the same. Any idea what might be causing this? The design view looks like this if that helps. There's no grouping or filters on the table.
Still not certain about the mechanics behind this but I found a 'solution' so I figured I'd post it. I just made a new dataset for my summary tables where the query was simply SELECT 1. Now I get a single row every time.
I am designing a report and have some doubts.
Actually i have 2 dataset (A (MainDataSet) and B)
In the report I am showing columns from A and I would like to show columns from B (as a group). I have used LookUp function but it is only showing me only 1 column from B.
I would like to show every column. For that I tried to use LookUpSet but I dont want to join the result. I would like to get as a single column.
There is a relation between A to B, 1:m.
I hope you had understand it.
Many thanks.
In your table properties set the DataSetName as DataSet B, the one with your Player data. Then use a Lookup expression to get a single record from MainDataSet A, i.e. the team and country for that player that year.
The expression here joins the datasets by year and position, but you may need an extra field to make sure each player appears in the correct team.
=Lookup(Fields!YEAR.Value + Fields!PLAYER_POSITION.Value,
Fields!YEAR.Value + Fields!POSITION.Value
Fields!COUNTRY.Value, "MainDataSet")
(This assumes that your two datasets come from different Data Sources. If they have the same source, it's typically easier to include all your data in a single dataset.)
I am trying to create a dynamic table - I have tried a Pivot Table, but cannot get it to work. So I thought that maybe it could be done with an IF-statement, but that did not work for me neither.
Basically, I have 2 tables, 1 table containing the information (data source table) and 1 table that should be dynamic according to the data in the first table.
So if I change the data in the E-column, the Fruit table (image below) must be updated accordingly.
So if I write 2 instead of 1 in the count of Apples, then it should create 2 apples under the "Fruit"-column". Data in the remaining columns will be calculated with a formula/fixed data - so that is not important.
I am open to any solutions; formulas, pivot tables, VBA, etc.
Have a nice weekend.
I have both Excel 2010 and 2013.
If you want to repeat some text a number of times you can use a somewhat complicated formula to do it. It relies on there not being duplicate entries in the Fruits table and no entries with 0 count.
Picture of ranges and results
Formulas involved include a starter cell E2 and a repeating entry E3 and copied down. These are actually normal formulas, no array required. Note that I have created a Table for the data which allows me to use named fields to get the whole column.
E2 = INDEX(Table1[Fruits],1)
E3 = IF(
INDEX(Table1[Count],MATCH(E2,Table1[Fruits],0))>COUNTIF($E$2:E2,E2),
E2,
INDEX(Table1[Fruits],MATCH(E2,Table1[Fruits],0)+1))
How it works
This formula relies on checking the number of entries above the current one and comparing to the desired count. Some notes:
The starter cell is needed to get the first result.
After the first cell, it counts how often the value above appears in the total list. This is compared to the desired count. If less than desired, it will repeat the value from above. If greater, it will go to the next item in the list. There is a dual relative/absolute reference in here to count cells above.
Since it goes to the next item in the list, don't put a 0 for a count or it will get included once.
You can copy this down for as many cells as you want. It will #REF! when it runs out of data. You can wrap in an IFERROR(..., "") to make these display pretty.
If the non-0 rule is too much, it can probably be removed with a little effort. If there are duplicates, that will be much harder to deal with.