SSRS textbox code not working properly

  • Hi

    I am trying to use this code to calculate and give me a value representing a percentage of LoggedTerritoryGoal.Value of a specific month. But it is not working I am getting the full LoggedTerritoryGoal.Value. can someone take a look at this and advice me.

    =IIF(Month(Parameters!EndDate.Value) > MAX(Fields!MonthNmbr.Value),

    (Fields!LoggedTerritoryGoal.Value / 12 * MAX(Fields!MonthNmbr.Value)),

    (Fields!LoggedTerritoryGoal.Value / 12 * Month(Parameters!EndDate.Value))

    )

  • Too little info to help.

    Put values 1,2 in your IIF statement to see which part is getting evaluated.

    =IIF(

    Month(Parameters!EndDate.Value) > MAX(Fields!MonthNmbr.Value),

    10,20)

    )

  • In more detail, what exactly is the code 'supposed' to do ?

    ----------------------------------------------------

  • I am trending the current value on a chart. For example

    =IIF(Month(Parameters!EndDate.Value) > MAX(Fields!OrderMonth.Value),

    give me the current value by:

    Let say Goal = 1000

    Order month = month order was purchased

    12= total number of months per year

    (SUM(Fields!Goal.Value)/SUM(12 * MAX(Fields!OrderMonth.Value))),

    (SUM(Fields!Goal.Value)/SUM(12 * Month(Parameters!EndDate.Value)))

  • gissah (12/27/2014)


    I am trending the current value on a chart. For example

    =IIF(Month(Parameters!EndDate.Value) > MAX(Fields!OrderMonth.Value),

    give me the current value by:

    Let say Goal = 1000

    Order month = month order was purchased

    12= total number of months per year

    (SUM(Fields!Goal.Value)/SUM(12 * MAX(Fields!OrderMonth.Value))),

    (SUM(Fields!Goal.Value)/SUM(12 * Month(Parameters!EndDate.Value)))

    Can you explain what you mean by "current value"? What are we measuring? What are the units of the field orderMonth? It looks like you are multiplying a date by a number. It would be helpful to provide some sample data and a illustration of what the output should look like.

    ----------------------------------------------------

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply