Quantcast
Channel: SQLServerCentral » Reporting Services » Reporting Services » Latest topics
Viewing all articles
Browse latest Browse all 2791

custom columns in a tablix (matrix)

$
0
0
HI , I was wondering if someone could help me.I have a SQL table with the following fields:-Variable-Period-Valuewhich generates the following simple tablix (matrix: Period1 Period2 Period3Var1 10 15 20Var2 1 2 4Var3 100 200 150Var4 1000 1100 1120Var5 50 55 60based on 5 variables and 3 periods.However I also want to show some calculations based on some of the variables.Say I also want to show Var1 x Var4 and Var1 x Var5.I want to generate the following: Period1 Period2 Period3Var1 10 15 20Var2 1 2 4Var3 100 200 150Var4 1000 1100 1120Var5 50 55 60VarN Calc Var1 x Var4 10000 16500 22400Calc Var1 x Var5 500 825 1200Avg (Var 1-5) 232.2 274.4 270.8I've tried using Sum(IIF(Fields!Variable.Value = "Var1", Fields!Value.Value,0)) x Sum(IIF(Fields!Variable.Value = "Var4", Fields!Value.Value,0))but its not working for me. I've tried the InScope function but cant get it working. Should I be creating a crosstab dataset rather than trying to do the calculation in the matrixAny help would be really appreciated. (SRS 2008 R2)

Viewing all articles
Browse latest Browse all 2791

Trending Articles