Does InScope function work inside Aggregate


hello,

does inscope function work inside aggregate function? using matrix control , want use following expression data cell.

=sum(code.getmevalue(inscope("matrix1_rowscope"), inscope("matrix1_columnscope"), fields!productsalesid.value, fields!sales.value))

function getmevalue written in code block of report gives me proper value hashtable according scope. getmevalue takes 4 arguments. first , second arguments boolean , decide scope. observed is, inscope returns false if use inside sum aggregate.

can please throw light on this?

regards,

hi sisvis allscripts,

clarification.

according description, suspect show values in 4 different zones below:

1: matrix cell within scope of both: row scope , column scope.
2: cell within scope of row, outside of column scope.
3: cell within column scope, outside of row scope.
4: subtotal cell outside both grouping scopes.

actually, define expression in matrix cell using following general pattern instead of using custom code:

=iif(inscope("rowgroup"),
    iif(inscope("columngroup"),
      "in matrix cell (1)",
       "in subtotal of rowgroup (2)"),
    iif(inscope("columngroup"),
      "in subtotal of columngroup (3)",
       "in subtotal of entire matrix (4)"))

so confirm values want show in four different zones of matrix, give logic explanation these 4 zones, after getting requirement, expression further.

if misunderstand, please feel free let me know.

thanks,
eileen



SQL Server  >  SQL Server Reporting Services, Power View



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........