Forum Discussion
report builder - using dynamically created columns in expressions
- Anonymous4 years ago
it's actually not that bad. add a column, use the scoped sum function (=Sum(Fields!YearlyIncome.Value,"GroupByInitial") where "GroupByInitial" is the name of the target group) and the name of the group and add an if statement to exclude the undesired values(all months except last month) and a group filter to exclude the parameter of the other dynamically provided column "cost". in this case i only wanted to sum if the type = sales. with no "cost" data to return, only the 1 row ("sales") is dynamically provided.
=Sum(IIF(Fields!GLPeriodBal_FiscalPeriod.Value = Month(Today) - 1,Fields!Calculated_REBalance_Amt.Value , nothing),"Domestic") / Sum(IIF(Fields!GLPeriodBal_FiscalPeriod.Value = Month(Today) - 1, Fields!Calculated_REBalance_Amt.Value, nothing))
it's actually not that bad. add a column, use the scoped sum function (=Sum(Fields!YearlyIncome.Value,"GroupByInitial") where "GroupByInitial" is the name of the target group) and the name of the group and add an if statement to exclude the undesired values(all months except last month) and a group filter to exclude the parameter of the other dynamically provided column "cost". in this case i only wanted to sum if the type = sales. with no "cost" data to return, only the 1 row ("sales") is dynamically provided.
=Sum(IIF(Fields!GLPeriodBal_FiscalPeriod.Value = Month(Today) - 1,Fields!Calculated_REBalance_Amt.Value , nothing),"Domestic") / Sum(IIF(Fields!GLPeriodBal_FiscalPeriod.Value = Month(Today) - 1, Fields!Calculated_REBalance_Amt.Value, nothing))