May 24, 2011 at 5:45 am
Hi I have a matrix where im trying to calc some percentages using:
=COUNT(Fields!TaskID.Value)/COUNT(Fields!TaskID.Value, "dataset1")
However I get a;
"The Value expression for the text box ‘TaskID’ has a scope parameter that is not valid for an aggregate function. The scope parameter must be set to a string constant that is equal to either the name of a containing group, the name of a containing data region, or the name of a dataset."
error message
Can anyone help me with this, I'm new to ssrs and have looked at the inscope function but I dont understand it.
Any help greatly appreciated
Cheers
Carl.
May 24, 2011 at 5:47 am
You can put that 2nd count in a textbox, name the textbox something meaningful and then use the textbox value as such :
ReportItems!txtSumValeurOuvertCUPA.Value
May 24, 2011 at 5:53 am
Even doing COUNT(Fields!TaskID.Value, "dataset1") in a text box gives the same error!
May 24, 2011 at 6:09 am
Ok then, use a tablix, set the dataset for the tablix and then do count(*) in 1 column. That should work.
If not try sum(1).
May 24, 2011 at 6:13 am
This is my matrix:
PeriodNumber
PeriodYear Asset Sub_Asset Visit_Status Total Total
Total
Total
Total
I want to be able to show the percentage of each Visit_Status against each periodnumber total
I'm not sure I'm explaining this very well.
May 24, 2011 at 6:19 am
Please post sample data and required output formatted in the matrix.
May 24, 2011 at 6:25 am
I want the percentage of each visit status against each total within the period number ir period 1, period 2 etc
May 24, 2011 at 6:26 am
carl.meads (5/24/2011)
I want the percentage of each visit status against each total within the period number ir period 1, period 2 etc
I can't see your image (on your desktop). Upload it as an attachement.
May 24, 2011 at 6:26 am
file attached
May 24, 2011 at 7:13 am
You can name a textbox in the grouping sections and use that as a dividor.
May 24, 2011 at 7:34 am
Can you give step by step instructions, I dont know how to do that!
May 24, 2011 at 7:53 am
You should first double check that you have the correct dataset or group name typed in correctly, the scope name is case sensitive. I've tested a tablix of mine that looks similar to yours and got COUNT(Fields!MyField.Value, "mydataset") to work fine. I then tried COUNT(Fields!MyField.Value, "Mydataset") - and got the exact error you got. So check your data set name including the case - I usually copy the dataset name from the dataset properties box and then paste it into my field expression so I know that I didn't fat finger the name. The other thing to check is that the field that you are trying to count is actually a field in the data set that you are specifying tin the COUNT function. You may just be referencing the wrong field name or data set name.
Thanks,
MWise
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply