So I am attempting to reorganize a report I put together. I had the running totals working before the redesign, but I have been pouring over this for a day and can't figure out why it is no longer functioning as I had thought.
The sum values are correct here, but it keeps accumulating them and not spreading them out over the area paths I've defined (which are populating obviously).
I have the sprint and area name linked in a hierarchy for the row groups then followed by this expression:
=RunningValue(Fields!Sev_1_Count.Value, SUM, "RowGroup")
Each column after the area name is defining a severity level of defects, just for context. The Sev_1_Count expression should take the count of all defects in this severity level then spread them across their associated area names. Which worked in the previous version... I just can't for the life of me figure why it won't work now. Thoughts?
I think the problem is that you're applying the running total to each field. It seems that wherever you're putting
RunningValue(Fields!Sev_1_Count.Value, SUM, "RowGroup")
you should just have
Fields!Sev_1_Count.Value
instead. As you need totals on both sides, you should have a matrix and the right and bottom rows of you columns should be outside the group "Iteration Name" with a value of
sum(Fields!Sev_1_Count.Value).
Not sure what I'm missing. Maybe your original dataset is set up in a way where you can't do that?
Your row groups should be grouped on name and your column groups should be grouped on severity level.
I'm not sure what you mean by your comment below Randy, but the best practice for something like this would be to have a data-set that consists of 3 fields:
"EnvironmentName", "DefectCount" and "SeverityLevel". Then in your matrix, you have the DefectCount as your Details, EnvironmentName as your RowGroup and SeverityLevel as your ColumnGroup. Then the right column and bottom row are placed outside the groups and have the value of Sum(DefectCount). Anything outside of that seems like an over-complication.
It seems like you want to use running total to add the columns for severity levels if i'm not mistaken? then you shouldn't be grouping them on rows. Instead of the "RowGroup" scope, maybe you should try None. Good luck.
Related
In SSRS report, I want to perform conditional color formatting where highest rank should be Green and lowest rank should be Red within a Regional Manager group as shown below
Note: Couple of options, I was thinking of includes
I am using custom code function, for deriving Min and Max value, and somehow if I can include grouping filter on Regional Manger then it could work, but don't know if that's possible
In dataset, I create extra columns for each column and store Min\max value in it. But less keen towards this option, since I have 24 different ranks and which would mean, I will need 24 different columns along with current 40 attributes
Any help would be appreciated
I know you don't want to do this for each column, but despite your misgivings it is probably the best approach. Based on my previous answer to your earlier related question you can colour the min and max for each group as follows.
Create a table with fields store, atvrank, and btvrank
Right click the row header, and select Add Group -> Row Group - Parent Group, and choose Regional Manager. Set the Group name to RegionalManagerGroup
Then set the background colour for your cells to
=iif(Fields!atvRank.Value = min(Fields!atvRank.Value, "RegionalManagerGroup"),
"Green",
iif(Fields!atvRank.Value = max(Fields!atvRank.Value, "RegionalManagerGroup"),
"Red",
"White"
)
)
This now finds the maximum and minimum within the current group instead of the whole dataset. You will need to set this expression for each field individually, but this is probably less effort than returning new rows from the database to determine the maximum and minimum for each field.
This approach will give the following output
Please seriously consider this solution. If you have further questions, please just ask.
I'm fairly new to SQL and I have been issued my first report to build. I have written an SQL query to give me a set of results that I would like to publish in a report.
I have unioned about 20 small queries all containing the correct amount of columns. One column is a misc column with about 15 different descriptions in (this is what I want to count).
I have uploaded my data set and now want to be able to choose a cell in my report to bring back a certain description.
At the minute I'm using
=count(fields!misc.values)
and it's giving me the whole count, about 200.
I would like to know if there is any kind of "where clause" (filter) which I can use to state which description results I want to bring back.
You can use am expression to count the misc.value you need. It will work like a count using a where clause:
=Sum(iif(Fields!misc.Value ="Some description",1,0))
Example:
For count the FSMethod with MethodOne as value I used this expression:
=Sum(iif(Fields!FSMethod.Value ="MethodOne",1,0))
Note the expression sums by 1 if the FSMethod.Value is MethodOne.
For count the rows with FSMethod column with MethodTwo value.
=Sum(iif(Fields!FSMethod.Value ="MethodTwo",1,0))
Let me know if this can help you.
I have an SSRS report thats query returns many results. They are grouped to aggregate them by item group and division, as well as a couple of other groups. Whats happening is the total line is taking the total for ALL of the result lines instead of the grouped lines.
I have tried adding a scope to the sum expression in the report but to no avail. All I really need it to do is sum up the visible columns.
Heres a shot of my groups:
If i run the report, look at the totals for the columns, they are way off:
This should be 29,329 but it is (i believe) totaling everything outside of the groups.
Is there a way to just sum the column so I can get the amount desired?
You may need to recreate your groups again.
from the looks of your diagram, your total row is Outside your group Item_Process_Group, so the [sum(Sales_Quantity)] is summing all groups (as your comment suggest.
If your total ([sum(Sales_Quantity)]) was on the (empty)cell above where its displayed on the pic above, it should total correctly
I am currently working on a requirement as follows and would appreciate some help in figuring out a way to configure the aggregation of my measure:
I have a fact table that contains the following Item ID, DateID,StoreID, ReceivedComments. The way received comments work is that on a daily basis a new record is created that adds to the value of received comments (for example if Item 5 in Store 5 on 1 Jan had 23 Received Comments and it received 5 comments the following day, the row for Jan 2 would be Item 5, Store 5, Jan 2, 28)
We created a measure using MAX and it works fine whenever Item ID is used in the query. When we start moving to a higher level the max produces wrong results. Our requirement is to setup the measure to be as follows:
If the member selected is on the Item Level then MAX, if it's on any other level (Date or Store) then the measure should aggregate the Max of all Items under this date or store.
Due to the business rules and structure of the database Store and Item are different dimensions so I can not include them in 1 Hierarchy.
We have been playing around with Custom RollUps but so far haven't been able to get it to work.
Thanks
I would solve this by using a more traditional approach to your fact table. Instead of keeping a cumulative count in the ReceivedComments column, I would keep only the number of comments received THAT DAY.
That way, instead of using MAX, you can create your measure using SUM, and it will automatically rollup when you go to higher levels.
The only disadvantage I can see to this approach is that you will need to use a range of dates, instead of only the most recent date, to get a full total of all the comments for a given item/store/date. But that's a very small change to your MDX.
Someone suggested using ISLEAF to determine the level, Instead of using ISLeaf i went with AS CASE WHEN [Item].[ItemID].CURRENTMEMBER.LEVEL IS [Item].[ItemID].[(All)] so I don't have to account for other dimensions such as Date, Store, etc as I have several other dimensions that all behave the same way.
And then I went with this formula to determine the Sum of the Max of the items in a particular store like this:
SUM({[Item].[Item ID].children},[Measures].[ReceivedComments]), Now I expect some performance issues with this measure but we are currently running some tests to see if it's gonna be reliable to work with it on actual data.
I'm just starting with Reporting Services so please take that into consideration.
I'm trying to make a report that groups by Nominee. I also want to group by Nominator i.e. so that if a Nominee has the same Nominator twice then it displays only ONE row instead for two and it increments field Number of Nominations (I get I need to use COUNT() here) and adds the total points of both (which I suspect I need to use SUM() on).
This is my table (on top) and the one I want to display on the bottom.
http://i.imgur.com/DZNoB.png
Notice on the top table that Janine and Rose have 2 different nominations with the same Nominator, therefore on the bottom table they display counts 2 on number of nominations and the sum of the points for both of the nominations.
So far I've tried this:
http://i.imgur.com/LPyiY.png
How can I make it so I can include name, Dept, points and number of nominations in between groups? I've tried inserting text boxes but it doesn't work. Is there a better way to do this?
Also I'm using a Tablix
Just create one group by option that takes the Nominee Name / ID, and display the name.
Within the details section add each nominator name. In the footer of the Nominee Name group just add =COUNT(Fields!NominatorID.Value)
It would end up with something like this: