Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Matrix Question

Author  Topic 

1sabine8
Posting Yak Master

130 Posts

Posted - 2009-01-14 : 03:32:01
Hi,
I have a GroupColumn "Restaurant" in a Matrix and under it i have two columns "%" and "Count". I added a Subtotal column for "Restaurant" so as a result i am getting totals of % and count. but the values in % are wrong so i need to hide it. How can i do that? I am unable to access it. Or is there anyway to add a column to the grid where i will put the expression i want for the total?
Thanks in advance

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-14 : 03:38:20
you can add a conditional expression to show correct value in %. just use like
=IIF(Inscope("Restaurant"),yourcurrent expression,IIF(Count(Fields!YourField.value,"Restaurant")>0,SUM(Fields!YourField.value,"Restaurant")/Count(Fields!YourField.value,"Restaurant"),0))
Go to Top of Page

1sabine8
Posting Yak Master

130 Posts

Posted - 2009-01-14 : 04:09:56
Hi,
Thanks for your reply but can u help me with the expression you gave me?
The expression i am using in the % column is:
=IIF(Count(Fields!new_servicename.Value)=0," ",CStr(CInt((Fields!CountService.Value*100)/Sum(Fields!CountService.Value, "Total_Service"))&"%"))

So how should i insert it in the expression you gave me? And can you please explain for me more concerning it?
Also if i may know where should i put the expression you gave me (in the subtotal, there is only place for the title expression)
Thanks
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-14 : 08:31:20
you just need to put below expression in the detail column for %
=IIF(Inscope("Restaurant"),IIF(Count(Fields!new_servicename.Value)=0,0,(Fields!CountService.Value)/Sum(Fields!CountService.Value, "Total_Service")),IIF(Count(Fields!new_servicename.Value,"Restaurant")=0,0,Sum(Fields!CountService.Value,"Restaurant")/Sum(Fields!CountService.Value, "Total_Service")))
Go to Top of Page
   

- Advertisement -